Skip to main content

PivotCustomGroupIntervalEventArgs.GroupValue Property

Gets or sets a group value.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v23.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public object GroupValue { get; set; }

Property Value

Type Description
Object

An object that represents the group value.

Remarks

The PivotGridControl.CustomGroupInterval event enables you to group axis values using your own criteria. Use the GroupValue property to specify group values.

Example

This example shows how to implement custom group intervals in Pivot Grid to group axis values.

View Example

<Window xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        x:Class="HowToBindToMDB.MainWindow"
        Loaded="Window_Loaded">
    <Grid>
        <dxpg:PivotGridControl DataProcessingEngine="Optimized"
                               HorizontalAlignment="Left" Name="pivotGridControl1"
                               VerticalAlignment="Top">
            <dxpg:PivotGridControl.Fields>
                <dxpg:PivotGridField Name="fieldProductGroup" Area="RowArea"
                                     Caption="Product Group">
                    <dxpg:PivotGridField.DataBinding>
                        <dxpg:ExpressionDataBinding Expression="Iif(Substring([fieldProductName], 0, 1) &lt; 'F', 'A-E', Substring([fieldProductName], 0, 1) &lt; 'T', 'F-S', 'T-Z')" />
                    </dxpg:PivotGridField.DataBinding>
                </dxpg:PivotGridField>
                <dxpg:PivotGridField Name="fieldProductName" Area="RowArea"
                                     Caption="Product Name" >
                    <dxpg:PivotGridField.DataBinding>
                        <dxpg:DataSourceColumnBinding ColumnName="ProductName" />
                    </dxpg:PivotGridField.DataBinding>
                </dxpg:PivotGridField>
                <dxpg:PivotGridField Name="fieldExtendedPrice"
                                     Area="DataArea" CellFormat="c0">
                    <dxpg:PivotGridField.DataBinding>
                        <dxpg:DataSourceColumnBinding ColumnName="Extended Price"/>
                    </dxpg:PivotGridField.DataBinding>
                </dxpg:PivotGridField>
                <dxpg:PivotGridField Name="fieldCountry"
                                     Area="ColumnArea" >
                    <dxpg:PivotGridField.DataBinding>
                        <dxpg:DataSourceColumnBinding ColumnName="Country"/>
                    </dxpg:PivotGridField.DataBinding>
                </dxpg:PivotGridField>
            </dxpg:PivotGridControl.Fields>
        </dxpg:PivotGridControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GroupValue property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also