Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Collapse]Layout
     Field Location and Order
     Data Cell Layout
     Field Groups
    [Expand]Customization Form
     Best Fit
     Save and Restore Layout
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Field Groups

The PivotGridControl allows you to arrange its fields into groups. End-users cannot separate such fields by dragging one of them to a different area or hiding it in the customization form.

Expanded Field Groups

Fields can be arranged into groups stored in the PivotGridControl.Groups collection. To move a group to a specific area or to a new position within the current area, use the PivotGridFieldBase.Area and PivotGridFieldBase.AreaIndex properties of the first field in the group. Modifying these properties for the second and subsequent fields in the group will have no effect.

Grouped fields can be collapsed and expanded by clicking the expand buttons. Collapsing/expanding a grouped field header collapses/expands columns or rows that correspond to grouped child fields. The PivotGridFieldBase.ExpandedInFieldsGroup property allows you to get or modify the expansion status of grouped fields in code.

Expanded Group Values

A group value is an ordered set of values (from fields) arranged into a group. For instance, the "Year - Quarter - Month" field group in the image below contains the "1996 - Quarter 3 - September", "1994 - Quarter 3 - August" and "1994 - Quarter 4" group values.

Group values may include values from all fields in the group (like the "1994 - Quarter 3 - August" group value from the example above), or from only several of them (the "1994 - Quarter 4" group value). In the latter instance, the group value has a set of child values. In the PivotGridControl shown in the image below, the "1994 - Quarter 4" group value has the 'October', 'November' and 'December' child values.

Use the PivotGridGroup.GetUniqueValues method to obtain child values from a particular group value.

Expanded Example: How to Group Fields

The following example demonstrates how to combine fields into a group.

In the example three fields ('Country', 'Region' and 'City') are combined into a new group in that order. This ensures that the 'Country' field will be followed by 'Region' which is in turn followed by 'City'. If the 'Region' field is being dragged to another area the other fields will be dragged as well. The following image shows the 'Region' field being dragged to the Filter Header Area.

Expanded See Also

How would you rate this topic?​​​​​​​