How to expand and collapse entire group in PivotGrid?

23 Oct 20191 minute to read

Expanding entire group in PivotGrid

After defining PivotGrid control, invoke the method ExpandAllGroup() to expand entire group in the PivotGrid control.

Please refer the below code sample.

  • C#
  • public MainWindow()
            {
                InitializeComponent();
                //To expand entire group in PivotGrid
                pivotGrid.ExpandAllGroup();
            }

    Collapsing entire group in PivotGrid

    After defining PivotGrid control, invoke the method CollapseAllGroup() to collapse entire group in the PivotGrid control.

    Please refer the below code sample.

  • C#
  • public MainWindow()
            {
                InitializeComponent();   
                //To collapse entire group in PivotGrid
                pivotGrid.CollapseAllGroup();
            }