I have a RadGrid on my page with the last data column being a GridTemplateColumn with a RadComboBox inside of it. I have been going by this example here to help familiarize myself with the RadGrid control. I know there is a DropDown column type, but I want to try and get this TemplateColumn working.
Whenever I click update on a row, my RadComboBox has the list of different Frequencies and has the proper one selected. When I select a different frequency and click update again to save those changes, the frequency isn't saved. It is still the previous one.
I have attached a picture of my model. OpenAccessDataSource is Task while FrequencyDS is TaskFrequency.
Here is my grid:
Whenever I click update on a row, my RadComboBox has the list of different Frequencies and has the proper one selected. When I select a different frequency and click update again to save those changes, the frequency isn't saved. It is still the previous one.
I have attached a picture of my model. OpenAccessDataSource is Task while FrequencyDS is TaskFrequency.
Here is my grid:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
CellSpacing
=
"0"
GridLines
=
"None"
AutoGenerateEditColumn
=
"True"
DataSourceID
=
"OpenAccessDataSource"
AllowAutomaticUpdates
=
"True"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataSourceID
=
"OpenAccessDataSource"
DataKeyNames
=
"Id"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Id"
DataType
=
"System.Int32"
FilterControlAltText
=
"Filter Id column"
HeaderText
=
"Id"
SortExpression
=
"Id"
UniqueName
=
"Id"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"TaskName"
FilterControlAltText
=
"Filter TaskName column"
HeaderText
=
"TaskName"
SortExpression
=
"TaskName"
UniqueName
=
"TaskName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"NextRun"
FilterControlAltText
=
"Filter NextRun column"
HeaderText
=
"NextRun"
SortExpression
=
"NextRun"
UniqueName
=
"NextRun"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Enabled"
DataType
=
"System.Char"
FilterControlAltText
=
"Filter Enabled column"
HeaderText
=
"Enabled"
SortExpression
=
"Enabled"
UniqueName
=
"Enabled"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Frequency"
DataField
=
"Frequency"
UniqueName
=
"Frequency"
>
<
ItemTemplate
>
<%# DataBinder.Eval(Container.DataItem, "Frequency") %>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"FrequencyCB"
DataTextField
=
"Name"
DataValueField
=
"Name"
DataSourceID
=
"FrequencyDS"
SelectedValue='<%# DataBinder.Eval(Container.DataItem, "Frequency") %>' />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>