Hi
I would like to give the users the opportunity to expand rows in a hierarchical grid to a certain level. Our grid has a depth of 6 levels. The user then chooses in combobox the level to which he wants to expand the rows and all rows which belongs to a deeper level should stay collapsed. Currently it is just possible to expand/collapse all rows of the grid. Can anybody help? Thank you!
CheersDan
Hi Dan,
I think you would have to loop through the rows. What you can do is use the grid.Rows.GetRowsEnumerator method. This method will give you a sort've flattened loop or rows in all bands, and you can specify the lowest level band you want.
Setting the Expanded state on a lot of individual rows might be a performance hit, though. So I recommend that you check out the WinGrid Performance Guide and check out the section on BeginUpdate / EndUpdate.