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

PivotGridFieldBase.FilterValues Property

Gets or sets filter values for the current field.

Namespace: DevExpress.XtraPivotGrid

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

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
[Browsable(false)]
public PivotGridFieldFilterValues FilterValues { get; set; }

Property Value

Type Description
PivotGridFieldFilterValues

A PivotGridFieldFilterValues object that contains filter values for the current field.

Remarks

Use the FilterValues property to specify which records in the datasource should be displayed and used to calculate summaries within the PivotGridControl.

The PivotGridFieldFilterValues.Values property defines an array of filter values.

If the PivotGridFieldFilterValues.FilterType property is set to PivotFilterType.Excluded, datasource records that contain filter values in the current field are not processed by PivotGridControl.

If the PivotGridFieldFilterValues.FilterType property is set to PivotFilterType.Included, only records that contain filter values in the current field are processed.

An end-user automatically modifies the filter values collection when checking/unchecking specific items via the field’s filter drop-down.

The FilterValues property allows you to configure filtering by field values. In Pivot Grid, you can also filter data by summary values. To configure filtering by summaries, use the PivotGridFieldBase.SummaryFilter property.

Example

The example below shows how to apply filtering to the ‘fieldTradeMark’ field by adding ‘Chevrolet’ or ‘Chrysler’ to the PivotGridFieldBase.FilterValues collection.

pivotGridControl.BeginUpdate();
try {
    fieldTrademark.FilterValues.Clear();
    fieldTrademark.FilterValues.FilterType = PivotFilterType.Included;
    fieldTrademark.FilterValues.Add("Chevrolet");
    fieldTrademark.FilterValues.Add("Chrysler");
}
finally {
    pivotGridControl.EndUpdate();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterValues 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