PivotExcelFieldListControl Class

An Excel-style Field List.

Namespace: DevExpress.Xpf.PivotGrid

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

Declaration

public class PivotExcelFieldListControl :
    FieldListControlBase
Public Class PivotExcelFieldListControl
    Inherits FieldListControlBase

Remarks

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

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

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

pivotgrid_Excel2007CustomizationFrm

To create a simple-style Field List, use the PivotFieldListControl class.

Examples

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