Reputation: 412
I'm dynamically binding my grid with a result of linq expression on PageLoad and at HtmlRowPrepared event i'm trying to reach a DataRow with
for (int i = 0; i < grid.GetChildRowCount(visibleGrIndex); i++)
{
var row = grid.GetChildDataRow(visibleGrIndex, i);
}
but its ALWAYS NULL?
Upvotes: 0
Views: 853
Reputation: 3347
HtmlRowPrepared is triggered once for every grid row. So, you can use this code to fetch data row:
private void Grid_HtmlRowPrepared(object sender, ASPxGridViewTableRowEventArgs e) {
if (e.RowType == GridViewRowType.Group)
{
for (int i = 0; i < GetChildRowCount(e.VisibleIndex); i++)
{
var row = GetChildDataRow(e.VisibleIndex, i);
}
}
}
Upvotes: 1