This is a migrated thread and some comments may be shown as answers.

Dual Ajaxed combo boxes in RadGrid custom edit form

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joseph Wong
Top achievements
Rank 1
Joseph Wong asked on 19 Oct 2008, 11:33 PM

Hi,

I cannot find an adequate example of what I am trying to do. I'd appreciate any help or references to solve this problem:

I have a RadGrid with a custom edit form. In the form I would like to have two RadComboBoxes, say rcbState and rcbCity. I would like the rcbCity to automatically refresh its contents if rcbState changes. Again, I need to do this within the RadGrid FormTemplate.

I am using SQL Datasources:

<asp:SqlDataSource ID="sdsStates" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [states] order by state_name"></asp:SqlDataSource>


I don't know what to do for the second "city" datasource.

I am currently using DropDownLists:

                                        <asp:DropDownList ID="ddlStateID" runat="server" SelectedValue='<%# Bind("state_id") %>' AppendDataBoundItems="True" DataSourceID="sdsStates" DataTextField="state_name" CssClass="select" DataValueField="state_id">
                                            <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
                                        </asp:DropDownList>

... mostly because I can't find an equivalent easy method of binding for the RadComboBox.

Any help is greatly appreciated!

Thanks,
Joseph

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Oct 2008, 06:52 AM
Hello Joseph,

Go through the Source code and Description part of the example given in the following online demo link. You will find a similar scenario using GridDropDownColumns in the example wherein on the SelectedIndexChanged of the first combobox, the datasource for the second combobox is changed.
Accessing Cells And Rows

Thanks
Princy.
Tags
Grid
Asked by
Joseph Wong
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or