Skip to main content

PivotGridFieldBase.FilterValues Property

Gets or sets filter values for the current field.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v24.1.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

[Browsable(false)]
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
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();
}
See Also