Hi,
I'm trying to create dynamic controls within and EditForm of the RadGrid. I've read from previous posts that I need to do this within ItemCreated. The problem I have is that I need to create the dynamic controls based on what the user selects in a DropDownList as shown here
The problem is that AreaOfPracticeSelect DropDown is always empty, any ideas how I can accomplish this?
I'm trying to create dynamic controls within and EditForm of the RadGrid. I've read from previous posts that I need to do this within ItemCreated. The problem I have is that I need to create the dynamic controls based on what the user selects in a DropDownList as shown here
<EditFormSettings EditFormType="Template"> <FormTemplate> <asp:DropDownList ID="AreaOfPracticeSelect" runat="server" AutoPostBack="true" DataSourceID="AreaOfPracticeDataSource" DataTextField="mps_name" DataValueField="mps_areaofpractice_lookupid" AppendDataBoundItems="true"> <asp:ListItem Value="" Text="" /> </asp:DropDownList> <h5>Criteria</h5> <asp:PlaceHolder ID="CriteriaPlaceHolder" runat="server" /> </FormTemplate></EditFormSettings>protected void AreaOfPracticeGrid_ItemCreated(object sender, GridItemEventArgs e){ if (e.Item is GridEditableItem && e.Item.IsInEditMode) { DropDownList areaOfPracticeSelect = e.Item.FindControl("AreaOfPracticeSelect") as DropDownList; if (areaOfPracticeSelect != null && !string.IsNullOrEmpty(areaOfPracticeSelect.SelectedValue)) { Guid areaOfPracticeId = new Guid(areaOfPracticeSelect.SelectedValue); LoadCriteria(e.Item as GridEditFormItem, areaOfPracticeId); } }}The problem is that AreaOfPracticeSelect DropDown is always empty, any ideas how I can accomplish this?