Hi,
Is there a better way to access the litConnected from the the ItemDataBound event, I donĀ“t like the concept to calculate stuff to make it work, must be a better way?
Is there a better way to access the litConnected from the the ItemDataBound event, I donĀ“t like the concept to calculate stuff to make it work, must be a better way?
<
telerik:RadGrid
ID
=
"activeGrid"
runat
=
"server"
OnItemDataBound
=
"activeGrid_ItemDataBound"
AutoGenerateColumns
=
"false"
EnableAjaxSkinRendering
=
"true"
EnableAjax
=
"true"
>
<
MasterTableView
Name
=
"active"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"name"
HeaderText
=
"Name"
/>
<
telerik:GridBoundColumn
DataField
=
"thingie"
HeaderText
=
"Thing2"
/>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:Literal
runat
=
"server"
ID
=
"litConnected"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
NestedViewTemplate
>
Here be things..
</
NestedViewTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
protected
void
activeGrid_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.ItemType != GridItemType.NestedView)
return
;
var litConnected = activeGrid.MasterTableView.Items[e.Item.RowIndex / 3 - 1].FindControl(
"litConnected"
)
as
Literal;
}