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
710
Expand all groupbyrows that falls under a specific sorted column.
posted

Hi, 

How do I expand all the groupbyrows that falls only to a specific sorted column? I know how to set individual groupbyrow by .Expanded = true. However, I would like to expand all groupbyrows under a specific sorted column in the grid. Is there an easy way to do it?

 

 

Thank you,

Ada

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Ada,

    It depends what level the grouping is on. If you just want to expand the root level of the grid, you can use the grid.Rows.ExpandAll method. The method takes a boolean that determines whether or not it's recursive. So in this case, you would not want it to be recursive so it only expands one level. 

    If you want to control the initial expansion of rows, then you could use the InitializeGroupByRow event. 

    If the grouping it on a lower level, then you would probably want to expand the parent rows down to a certain level. For that, I think you would have to use the grid.Rows.GetRowsEnumerator and loop through all the rows up the level you want and set Expanded to true on all of them. 

Children
No Data