See attached screenshot.
If I add the following to my page, the drop down for the Gender field gets styled but when I change it from Male to Female, it commits the row as Male (the default selected value); I can no longer select Female and have it save. As soon as I remove the RadFormDecorator, everything works as desired but it loses the nicer display style.
I have tried using a Rad drop down instead but then I have issues loading the existing value (if Female is already selected, it still shows Male after edit no matter what I do).
Thanks.
If I add the following to my page, the drop down for the Gender field gets styled but when I change it from Male to Female, it commits the row as Male (the default selected value); I can no longer select Female and have it save. As soon as I remove the RadFormDecorator, everything works as desired but it loses the nicer display style.
<telerik:RadFormDecorator ID="rfdUIStyler" runat="server" DecoratedControls="All" /><telerik:GridTemplateColumn HeaderText="Gender" SortExpression="Gender" UniqueName="Gender" DataField="Gender" FilterControlAltText="Filter Gender column" ColumnEditorID="cmbGridEdit_Gender" ShowSortIcon="False"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "Gender") %></ItemTemplate> <EditItemTemplate> <asp:DropDownList ID="ddlGender" runat="server"> <Items> <asp:ListItem Text="Female" Value="Female" /> <asp:ListItem Text="Male" Value="Male" Selected="True" /> </Items> </asp:DropDownList> </EditItemTemplate> <HeaderStyle Wrap="False" HorizontalAlign="Left" Width="80px" CssClass="grid-header" /> <ItemStyle HorizontalAlign="Left" Width="90%" VerticalAlign="Top" /></telerik:GridTemplateColumn>protected void grdAthletes_ItemDataBound(object sender, GridItemEventArgs e){ Control ddlGenderSelector = null; Control ctrlFieldEditor = null; Control dtDoBEditor = null; try { //Some controls don't load the values into the custom editor's automatically so force the values through if (e.Item.IsInEditMode) { ddlGenderSelector = e.Item.FindControl("ddlGender"); //Get the gender selection control //Load the current value for Gender into the column editor control if (ddlGenderSelector != null) ((DropDownList)ddlGenderSelector).SelectedValue = ((DataRowView)e.Item.DataItem)[6].ToString(); //((RadDropDownList)ddlGenderSelector).SelectedValue = ((DataRowView)e.Item.DataItem)[6].ToString(); dtDoBEditor = ((GridEditableItem)e.Item)[grdAthletes.MasterTableView.RenderColumns[7].UniqueName].Controls[0]; if ((dtDoBEditor != null) && string.Compare(_sProgramCode, "Y", true) == 0) { ((RadDatePicker)dtDoBEditor).SelectedDate = DateTime.Now.AddYears(-20); ((RadDatePicker)dtDoBEditor).MinDate = DateTime.Now.AddYears(-20); } //Get the editor for the first field and set focus to it ctrlFieldEditor = ((GridEditableItem)e.Item)[grdAthletes.MasterTableView.RenderColumns[3].UniqueName].Controls[0]; if (ctrlFieldEditor != null) ctrlFieldEditor.Focus(); } } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); Exceptions.ProcessModuleLoadException(this, ex); }}I have tried using a Rad drop down instead but then I have issues loading the existing value (if Female is already selected, it still shows Male after edit no matter what I do).
Thanks.
