Skip to main content
Tag

PivotGridField.FieldFilterValues Property

Gets or sets the filter values for the current field.

Namespace: DevExpress.Xpf.PivotGrid

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

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public IEnumerable FieldFilterValues { get; set; }

Property Value

Type Description
IEnumerable

An object that implements the IEnumerable interface and represents a collection of field filter values.

Remarks

The following example shows how to how to filter in markup the Category field by the “Produce” and “Seafood” values. To do this, add these values to the FieldFilterValues collection and set a filter type using the PivotGridField.FilterType property.

<dxpg:PivotGridField Area="RowArea" Caption="Category" FieldName="CategoryName" 
                     Name="fieldCategory" AreaIndex="0" FilterType="Included">
    <dxpg:PivotGridField.FieldFilterValues>
        <x:Array Type="{x:Type sys:String}" xmlns:sys="clr-namespace:System;assembly=mscorlib">
            <sys:String>Produce</sys:String>
            <sys:String>Seafood</sys:String>
        </x:Array>
    </dxpg:PivotGridField.FieldFilterValues>
</dxpg:PivotGridField>

The code sample below illustrates how to define the same filter values in code-behind:

public MainWindow() {
    List<object> filterValues = new List<object>();
    filterValues.Add("Produce");
    filterValues.Add("Seafood");

    fieldCategory.FilterType = DevExpress.Xpf.PivotGrid.FieldFilterType.Included;
    fieldCategory.FieldFilterValues = filterValues;
}
See Also