Category / Section
How to set the width of the DataHeaderArea items
1 min read
C#
if (this.pivotGridControl1.GroupingBar != null) for (int i = 0; i < this.pivotGridControl1.GroupingBar.DataHeaderArea.Items.Count; i++) { ListBoxItem item = this.pivotGridControl1.GroupingBar.DataHeaderArea.ItemContainerGenerator.ContainerFromIndex(i) as ListBoxItem; item.MinWidth = 80; |
If you are in need to hide the items we suggest you to set the Visibility property of DataHeaderArea to Collapsed.
C#
this.pivotGridControl1.GroupingBar.DataHeaderArea.Visibility = System.Windows.Visibility.Collapsed; |
Figure: Pivot Grid shows customized width of data header items