Expand rows in hierarchical grid
Hi,
I have a hierarchical grid with about 4 levels. When the form opens up for the firs time, I would like only the first level to be expanded and all other levels to be collapsed. Is there a way to achieve this. The only code I have seen pertaining to this is " this.grid.Rows.ExpandAll() ", but this expands all the rows. I only want only one level to be expanded.
Thanks,
Deepak
0
-
Hi,
The grid has two API providing Row objects: grid.Rows and grid.Nodes. The first one represents only visible rows. The second - rows (visible and invisible) on the top level of the grid. So if you need to expand only the first level, use the following code:
foreach (Row row in grid.Nodes)
{
row.Expanded = true;
}Best regards,
Dapfor
0
Please sign in to leave a comment.
Comments
1 comment