I feel sure this is very straightforward but I am just not getting it.
I have a grid column and code behind as a test approach like this:
But the item does not show up in the combo box, and there are no error messages.
What am I doing wrong?
Thanks for some pointers...
Clive
I have a grid column and code behind as a test approach like this:
<
telerik:GridTemplateColumn
DataField
=
"Category"
HeaderText
=
"CatID"
SortExpression
=
"Category"
UniqueName
=
"Category"
>
<
EditItemTemplate
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
Runat
=
"server"
>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
ID
=
"CategoryLabel"
runat
=
"server"
Text='<%# Eval("Category") %>'></
asp:Label
>
</
ItemTemplate
>
<
HeaderStyle
Width
=
"150px"
/>
</
telerik:GridTemplateColumn
>
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
If (TypeOf e.Item Is GridEditableItem) AndAlso (e.Item.IsInEditMode) Then
Dim edititem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim RCB1 As RadComboBox = DirectCast(edititem("Category").Controls(0), RadComboBox)
Dim item1 As New RadComboBoxItem()
item1.Text = "BibleStudy"
item1.Value = "Bible Study"
RCB1.Items.Add(item1)
End If
End Sub
But the item does not show up in the combo box, and there are no error messages.
What am I doing wrong?
Thanks for some pointers...
Clive