Articles in this section
Category / Section

How To Collapse or Expand the rows or columns in PivotGridControl

2 mins read

 

C#

Example:
To collapse a single column:
pivotGridControl1.CollapseColumn("Australia");
To expand a single column:
pivotGridControl1.ExpandColumn ("Australia");
To collapse a single row:
pivotGridControl1.CollapseRow("Bike");
To expand a single row:
pivotGridControl1.ExpandRow("Bike");
To collapse entire column (For Example: ColumnHeader name->“Country” which has columns like “Australia”, ”Canada” ,”France”)
List<string> columnHeaders = new List<string> { "Australia", "Canada", "France" }; pivotGridControl1.CollapseColumn(columnHeaders); 
To collapse entire row( For Example: RowHeader name-> “Product” which has rows like “Bike” and “Car”
List<string> rowHeaders = new List<string> { "Bike", "Car" };
pivotGridControl1.CollapseRow(rowHeaders);
To expand entire row /Column
pivotGridControl1.ExpandAllGroup();
 

 

 

C:\Users\labuser\Dropbox\Screenshots\Screenshot 2014-06-05 11.33.25.png

Figure: Pivot Grid shows single collapsed row (Bike)

 

C:\Users\labuser\Dropbox\Screenshots\Screenshot 2014-06-05 11.34.18.png

Figure: Pivot Grid shows single collapsed column (Canada)

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied