PivotGridFieldFilterValues Class

Contains filter values for a specific field.

Namespace: DevExpress.XtraPivotGrid

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

Declaration

public class PivotGridFieldFilterValues :
    IFilterValues,
    IXtraSerializableLayoutEx,
    IFieldFilter,
    IXtraSerializable,
    IXtraSupportDeserializeCollectionItem,
    IXtraSupportDeserializeCollection,
    IXtraSupportShouldSerialize
Public Class PivotGridFieldFilterValues
    Implements IFilterValues,
               IXtraSerializableLayoutEx,
               IFieldFilter,
               IXtraSerializable,
               IXtraSupportDeserializeCollectionItem,
               IXtraSupportDeserializeCollection,
               IXtraSupportShouldSerialize

Remarks

A field's PivotGridFieldBase.FilterValues property of the PivotGridFieldFilterValues class gives the ability to apply a filter to a field, i.e. select which of the records should be processed by the XtraPivotGrid control. A filter specified by the PivotGridFieldBase.FilterValues property is in effect for filter fields, column fields and row fields.

The PivotGridFieldFilterValues class stores filter values for a specific field. The filtering functionality is dependant upon the PivotGridFieldFilterValues.FilterType property's value. It specifies whether the filter values should be displayed in or removed from the XtraPivotGrid control.

If the PivotGridFieldFilterValues.FilterType property is set to PivotFilterType.Included, the PivotGridFieldFilterValues class stores the values which should be displayed within the control. In this case, the XtraPivotGrid control will only process those records that contain filter values in the corresponding field.

If the PivotGridFieldFilterValues.FilterType property is set to PivotFilterType.Excluded, the PivotGridFieldFilterValues class stores the values which will not be displayed within the control. In this case, the XtraPivotGrid control will only process those records that do not contain filter values in the corresponding field.

To add values to and remove them from the filter value list use the PivotGridFieldFilterValues.Add and PivotGridFieldFilterValues.Remove methods.

Specific fields can contain Null (or DBNull) values. The PivotGridFieldFilterValues.ShowBlanks property determines whether the records which contain Null values should be processed by the control. If this property is set to false summaries are not calculated against such records.

An end-user can apply a filter to a field via the filter dropdown. It can be activated by clicking the field's Filter Button. When an end-user checks/unchecks items within the filter dropdown this automatically modifies the filter value collection.

Examples

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();
}

Inheritance

Object
PivotGridFieldFilterValues
See Also