Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
GridMultiBand: Check if all/some rows are expanded/collapsed
posted

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?

Parents
No Data
Reply
  • 469350
    Offline posted

    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.

Children