Skip to main content
A newer version of this page is available. .

PivotFieldListControl Class

A simple-style Customization Form.

Namespace: DevExpress.Xpf.PivotGrid

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

Declaration

public class PivotFieldListControl :
    FieldListControlBase

Remarks

Customization Form is used to show, hide and reorder pivot grid fields, as well as move them between areas. To learn more, see Customization Form.

By default, the Customization Form is displayed in a separate window. Use the PivotFieldListControl class to manually create a standalone Customization Form that can be located in the same window with PivotGridControl.

After the PivotFieldListControl is created, you should specify a PivotGridControl that will own the Customization Form. To do this, assign the desired PivotGridControl instance to the ColumnChooserControlBase.Owner property.

pivotgrid_SimpleCustomizationFrm

To create an Excel-style Customization Form, use the PivotExcelFieldListControl class.

Example

The following example demonstrates how to create a standalone Customization Form.

In this example, PivotExcelFieldListControl is created and bound to a Pivot Grid by assigning the PivotGridControl instance to the ColumnChooserControlBase.Owner property.

<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"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
        x:Class="DXPivotGrid_StandaloneFieldList.MainWindow"
        Height="600" Width="900" Title="Main Window">
    <Grid x:Name="root">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="250" />
        </Grid.ColumnDefinitions>
        <dxpg:PivotGridControl Name="pivotGridControl1" Grid.Column="0">
            <dxpg:PivotGridControl.Fields>
                <dxpg:PivotGridField Name="fieldCountry" FieldName="Country" Area="FilterArea"
                                     />
                <dxpg:PivotGridField Name="fieldUnitPrice" FieldName="UnitPrice" Area="FilterArea"
                                     />
                <dxpg:PivotGridField Name="fieldDiscount" FieldName="Discount" Area="FilterArea"
                                     />
                <dxpg:PivotGridField Name="fieldCustomer" FieldName="Sales Person" Area="RowArea"
                                     Caption="Customer" />
                <dxpg:PivotGridField Name="fieldYear" FieldName="OrderDate" Area="ColumnArea"
                                     Caption="Year" GroupInterval="DateYear" />
                <dxpg:PivotGridField Name="fieldMonth" FieldName="OrderDate" Area="ColumnArea"
                                     Caption="Month" GroupInterval="DateMonth" />
                <dxpg:PivotGridField Name="fieldCategoryName" FieldName="CategoryName" Area="RowArea"
                                     Caption="Category" />
                <dxpg:PivotGridField Name="fieldProductName" FieldName="ProductName" Area="FilterArea"
                                     Caption="Product" />
                <dxpg:PivotGridField Name="fieldQuantity" FieldName="Quantity" Area="DataArea" />
            </dxpg:PivotGridControl.Fields>
        </dxpg:PivotGridControl>
        <dxpg:PivotExcelFieldListControl Grid.Column="1" Owner="{Binding ElementName=pivotGridControl1}"
                                    Margin="5,5,5,5" />
    </Grid>
</Window>
See Also