Hello,
I have a code like this:
How do I generate second drop down list "drpProfile" dynamically in code behind based on selected value of "drpCategory" list?
Please, help.
Thanks,
I have a code like this:
| <telerik:RadGrid runat="server" ID="RadGrid1" Skin="WebBlue" PagerStyle-AlwaysVisible="true" GridLines="Horizontal" AutoGenerateColumns="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnUpdateCommand="RadGrid1_UpdateCommand" AllowPaging="true" PageSize="20" OnItemDataBound="RadGrid1_ItemDataBound1"> |
| <MasterTableView AutoGenerateColumns="false" DataKeyNames="DoctorId" > |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="DoctorId" DataField="DoctorId" UniqueName="DoctorId" Visible="false" /> |
| <telerik:GridBoundColumn HeaderText="Name" DataField="DoctorName" UniqueName="Name" /> |
| <telerik:GridBoundColumn HeaderText="Category" DataField="Category" UniqueName="Category" /> |
| <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" /> |
| </Columns> |
| <EditFormSettings EditFormType="Template"> |
| <FormTemplate> |
| <table> |
| <tr> |
| <td><h3>Doctor Details:</h3></td> |
| </tr> |
| <tr> |
| <td>Name:</td> |
| <td><asp:TextBox ID="txtDoctorname" runat="server" Text = '<%# Eval("DoctorName") %>'></asp:TextBox></td> |
| <td>Category:</td> |
| <td> |
| <asp:DropDownList ID="drpCategory" runat="server"> |
| <asp:ListItem Text="Physician" Value="23" Selected="True"></asp:ListItem> |
| <asp:ListItem Text="Dentist" Value="14"></asp:ListItem> |
| <asp:ListItem Text="Alt Medicine" Value="22"></asp:ListItem> |
| </asp:DropDownList> |
| </td> |
| <td>Profile type:</td> |
| <td> |
| <asp:DropDownList ID="drpProfile" runat="server"> |
| </asp:DropDownList> |
| </td> |
| </tr> |
| </table> |
| </FormTemplate> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |
How do I generate second drop down list "drpProfile" dynamically in code behind based on selected value of "drpCategory" list?
Please, help.
Thanks,
