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

PivotGridField.SetFilterValues(Object[], FieldFilterType, Boolean) Method

Adds the specified filter values to the collection.

Namespace: DevExpress.Xpf.PivotGrid

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

Declaration

public void SetFilterValues(
    object[] values,
    FieldFilterType filterType,
    bool showBlanks
)

Parameters

Name Type Description
values Object[]

An object that represents a collection of field filter values.

filterType FieldFilterType

A FieldFilterType enumeration member that specifies the filter type.

showBlanks Boolean

True, to show blank values; otherwise, false.

Remarks

The following example shows how to filter the Category field by the “Produce” and “Seafood” values. For this, add these values to the PivotGridField.FieldFilterValues collection.

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

    fieldCategory.SetFilterValues(filterValues.ToArray(), 
        DevExpress.Xpf.PivotGrid.FieldFilterType.Included, true);
}

You can get or set the field filter values collection by using the PivotGridField.FieldFilterValues property.

To add filter values to the collection asynchronously, use the PivotGridField.SetFilterValuesAsync method.

See Also