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
110
Expand Bands from outside of the grid
posted

I need to put an expand/collapse button outside of the grid to expand/collapse all rows and bands. Is there an example of this somewhere in the sample code?

Thanks

Parents
No Data
Reply
  • 110
    Verified Answer
    posted

    I think I found a solution. 

    I have a button called ExpandRows:

     private void ExpandRows_Click(object sender, EventArgs e)

            {

                for (int i = 0; i < this.WebHierarchicalDataGrid2.GridView.Rows.Count; i++)

                    this.WebHierarchicalDataGrid2.GridView.Rows[i].Expanded = true; 

            }

     

    This works. If anyone knows of a better solution please reply

Children
No Data