Hey,
I use the GridMultiBand for Windows Forms. In my dataset I've a relation between two tables. So the grid has two bands (band0 and band1). When the grid is filled with data for both bands it is posible to expand band0 so you can see the detail data (band 1).
What I want to do is to check wether all rows of the grid are expanded, not expanded or if there are some rows expanded and some not. how can I do that?
I was going to ask this same question, as traversing the rows is very slow, particularly if the rows haven't already been loaded into memory, and have child rows (we're talking seconds here, giving a noticeable delay).
I'll try the keeping track method, but it would be handy if there was an Expanded rows collection we could access, or an AllCollapsed/AllExpanded property on a RowsCollection.
Hi,
One way to do this would be to loop through all of the (band0) rows in the grid and check the Expanded property on each one.
Another option which requires more code but it more efficient would be to track the changes to the expanded states of the rows. So you could start with the assumption that all rows are collapsed. Then you could trap the AfterRowExpanded and AfterRowCollapsed events of the grid and keep a count of the number of expanded rows.