Skip to main content
Tag

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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