Hi,
I am using a heirarchical grid which is nested till level 3 and want to show some rows in the inner detail grids to be expanded. I wish to do this programmatically if the rows match some criteria.
I tried the following but it does not seem to work-
Can someone please help...
Thanks,
- Manoj
I am using a heirarchical grid which is nested till level 3 and want to show some rows in the inner detail grids to be expanded. I wish to do this programmatically if the rows match some criteria.
I tried the following but it does not seem to work-
protected void Page_PreRender(object sender, EventArgs e) |
{ |
foreach (GridDataItem masterItem in RadGrid1.MasterTableView.Items) |
{ |
// loop through the element under each category |
foreach (GridDataItem detailitem1 in masterItem.ChildItem.NestedTableViews[0].Items) |
{ |
foreach (GridDataItem detailitem2 in detailitem1.ChildItem.NestedTableViews[0].Items) |
{ |
if (...my criteria..) |
{ |
detailitem1.Expanded = true; |
//also tried the one below |
//RadGrid1.SelectedIndexes.Add(masterItem.ItemIndex, detailitem1.ItemIndex, detailitem2.ItemIndex); |
} |
} |
} |
} |
} |
Can someone please help...
Thanks,
- Manoj