foreach
(GridEditFormItem item in RadGrid1.MasterTableView.ChildEditItems) {
if(item.ItemType==GridItemType.EditFormItem)
{
((
DropDownList)item.FindControl("drop2")).Items.Add(new ListItem("Ravi" + ((DropDownList)item.FindControl"drop1")).SelectedValue));
}}
plz help give me any suggetions.
thx advance
<
telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" GridLines="None" PageSize = "10" AllowPaging="True" PagerStyle-Mode="NextPrevAndNumeric" AllowSorting="True"
ShowStatusBar="true" AutoGenerateColumns="False"
AllowMultiRowSelection ="true" ClientSettings-Selecting-AllowRowSelect="true" onneeddatasource="RadGrid1_NeedDataSource" >
<MasterTableView GridLines="None" HeaderStyle-CssClass="grid_hd" Width="100%" CommandItemStyle-CssClass="grid_cmd CommandItemDisplay="TopAndBottom" DataKeyNames="RoleID" InsertItemPageIndexAction="ShowItemOnFirstPage">
<Columns> ....
</Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td> <asp:DropDownList ID="drop1" runat="server" AutoPostBack="true"onselectedindexchanged="drop1_SelectedIndexChanged" > <asp:ListItem Value="1">ONE</asp:ListItem> <asp:ListItem Value="2">TWO</asp:ListItem>
</asp:DropDownList> <asp:DropDownList ID="drop2" runat="server"> </asp:DropDownList> </td> </tr>
</table> </FormTemplate></EditFormSettings></MasterTableView> </telerik:RadGrid>
Hi,
I have to change the selection in GridDropDownColumn2 and other TextBoxes when the user changes the select in GridDropDownColumn while Adding and Editing data. I am using GridEditMode.InPlace.
Ex: When the user selects Profession 'Programmer' then the 2nd GridDropDownColumn should automatically get filtered and display 'IT Dept' Otherwise 'General', by default.
Appreciate your help.
Many thanks.
JN