[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
     Field Groups
     Data Cell Layout
     Field Location and Order
    [Expand]Customization Form
     Best Fit
     Standalone Field Header Areas
     Group Value
     Save and Restore Layout
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Field Groups

The Pivot Grid provides the capability to arrange Fields into groups. End-users cannot separate grouped fields by dragging one of them to a different area or by hiding it in the Customization Form.

Expanded Create a Field Group

Do the following to create a new group:

  1. Create a PivotGridGroup descendant and add it to the PivotGridControl.Groups collection, which stores the Pivot Grid's field groups.
  2. You can define a new group in two ways:

  3. Set the PivotGridField.GroupIndex property to specify a field's index in the group.

Expanded Field Group Settings

To move a group to a specific area or new position within the current area, use the PivotGridField.Area and PivotGridField.AreaIndex properties of the first field in the group. Setting these properties for the second and subsequent fields in the group has no effect.

A Group Expand button allows you to collapse and expand the grouped field. Collapsing/expanding a grouped field header hides/shows columns or rows that correspond to grouped child fields.

To set the expansion status of grouped fields in code, use the PivotGridField.ExpandedInFieldsGroup property.

Expanded Member Table

Property Description
PivotGridControl.Groups Gets the collection of field groups.
PivotGridField.Group Gets or sets the group which owns the current field.
PivotGridField.GroupName Gets or sets the group name of the current field.
PivotGridField.GroupIndex Gets or sets the field's index in a group.
PivotGridField.ExpandedInFieldsGroup Gets or sets the current field's expansion status it belongs to a group.

Expanded Example: How to Arrange Fields into a Group

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

In this example, three fields ("Country", "Region" and "City") are combined in a new group, in this order. This ensures that the "Country" field is followed by "Region", which is in turn followed by "City". If the "Region" field is dragged to another area, the other fields accompany it.


A complete sample project is available at https://github.com/DevExpress-Examples/how-to-group-fields-e2129.

Is this topic helpful?​​​​​​​