Skip to main content

PivotGridFieldFilterValues.FilterType Property

Gets or sets the field’s filter type.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v22.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Dashboard.Design

Declaration

[DefaultValue(PivotFilterType.Excluded)]
public PivotFilterType FilterType { get; set; }

Property Value

Type Default Description
PivotFilterType Excluded

A PivotFilterType enumeration value which specifies the field’s filter type.

Available values:

Name Description
Excluded

Specifies that the XtraPivotGrid control should not display the filter values. All the other values will be displayed.

Included

Specifies that the XtraPivotGrid control should display only the filter values.

Remarks

The FilterType property specifies whether only the records that contain values from the PivotGridFieldFilterValues.Values array in the corresponding field are displayed in a pivot grid.

If the FilterType property is set to the PivotFilterType.Included value, only the records that contain values from the PivotGridFieldFilterValues.Values array in the corresponding field are displayed by a pivot grid. Otherwise, if the FilterType property is set to the PivotFilterType.Excluded value, only the records that do not contain values from the PivotGridFieldFilterValues.Values array in the corresponding field are displayed.

Note that when you change the filter type via the FilterType property, the actual filter condition is inverted. To switch the filter type without changing the filter condition, use the PivotGridFieldFilterValues.InvertFilterType or PivotGridFieldFilterValues.SetFilterType method. These methods invert the PivotGridFieldFilterValues.Values array after changing the filter type (i.e., they clear and populate the array with field values that were not contained in it previously).

The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also