PivotGridField.GroupInterval Property

Gets or sets how the values of the current column or row field are combined into groups. This is a dependency property.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v20.1.dll


public FieldGroupInterval GroupInterval { get; set; }
Public Property GroupInterval As FieldGroupInterval

Property Value

Type Description

A FieldGroupInterval value that specifies how the values of the current field are combined into groups.


Values of column and row fields can be combined into groups. By default, the control doesn't group the values of these fields and displays all their unique values along its left and top edge. The GroupInterval property allows you to change the logic used to decide which values should be grouped together.

For instance, for a field which displays date/time values, you can set its GroupInterval property to FieldGroupInterval.DateYear. As a result, the field's values will be grouped within a few categories, each of which will combine different values that belong to the same year.

To learn more, see Grouping.


This example shows how to group date-time values.

<Window x:Class="HowToBindToMDB.MainWindow"
        Title="MainWindow" Height="350" Width="525"  Loaded="Window_Loaded">
        <dxpg:PivotGridControl HorizontalAlignment="Left" Name="pivotGridControl1" 
                <dxpg:PivotGridField Name="fieldYear" FieldName="OrderDate" Area="RowArea"
                                     Caption="Year" GroupInterval="DateYear" />
                <dxpg:PivotGridField Name="fieldQuarter" FieldName="OrderDate" Area="RowArea"
                                     Caption="Quarter" GroupInterval="DateQuarter"
                                     ValueFormat="Qtr {0}" />
                <dxpg:PivotGridField Name="fieldMonth" FieldName="OrderDate" Area="RowArea" 
                                     Caption="Month" GroupInterval="DateMonth" />
                <dxpg:PivotGridField Name="fieldExtendedPrice" FieldName="Extended Price" 
                                     Area="DataArea" CellFormat="c0" />
See Also