Articles in this section
Category / Section

How to load the Pivot Grid with all of the data collapsed

1 min read

Initially pivotGrid internalGrid seems to be an empty. It gets filled only after the loaded Event executes. So, the CollapseAllGroup () code should be placed within the dispatcher event as shown below to make the pivot grid to load all the data collapsed.

C#

this.Dispatcher.BeginInvoke(

System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate()
 
{
 
this.pivotGrid1.CollapseAllGroup();
 
}
 
));
Or you can call the ApplyTemplate() before calling CollapseAllGroup() method as shown below:
this.pivotGrid1.ApplyTemplate();
 
this.pivotGrid1.CollapseAllGroup();
NOTE: Give the above code (ApplyTemplate()) snippet within the Constructor().
 
 

 

Example:

C:\Users\labuser\AppData\Local\Temp\Rar$DIa0.595\pg.png

Figure: Pivot Grid shows all data collapsed

 

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