Hello,
I need to find at server side an EditItemTemplate control in a GridTemplateColumn when the data are loaded in a Grid.
The Grid EditMode is set to "Batch":
I need to reference the "cbxMyValues" RadComboBox control.
When the ItemDataBound event is fired this code doesn't work because the type of e.Item is "GridDataItem".:
Please how can I get the RadComboBox object?
Thank you.
I need to find at server side an EditItemTemplate control in a GridTemplateColumn when the data are loaded in a Grid.
The Grid EditMode is set to "Batch":
<
MasterTableView
GridLines
=
"None"
HorizontalAlign
=
"NotSet"
CommandItemDisplay
=
"Top"
EditMode
=
"Batch"
AutoGenerateColumns
=
"False"
AllowNaturalSort
=
"false"
>
<
Columns
>
...............
<
telerik:GridTemplateColumn
HeaderText
=
"Values"
UniqueName
=
"Values"
DataField
=
"Values"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"100px"
></
HeaderStyle
>
<
ItemStyle
HorizontalAlign
=
"Center"
></
ItemStyle
>
<
ItemTemplate
>
<%#Eval("Values")%>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
ID
=
"cbxMyValues"
runat
=
"server"
Width
=
"80px"
AllowCustomText
=
"true"
MarkFirstMatch
=
"true"
AutoCompleteSeparator
=
";"
>
</
telerik:RadComboBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
..................
</
Columns
>
</
MasterTableView
>
I need to reference the "cbxMyValues" RadComboBox control.
When the ItemDataBound event is fired this code doesn't work because the type of e.Item is "GridDataItem".:
If
(
TypeOf
(e.Item)
Is
GridEditableItem)
AndAlso
(e.Item.IsInEditMode)
Then
Dim
lgeiCurrent
As
GridEditableItem =
CType
(e.Item, GridEditableItem)
Dim
lobjRadComboBox
As
RadComboBox = lgeiCurrent.FindControl(
"cbxMyValues"
)
End
If
Please how can I get the RadComboBox object?
Thank you.