Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PivotGridControl.ActiveFilter Property

Provides access to settings of the filter applied to the PivotGridControl‘s data.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.2.dll

NuGet Package: DevExpress.Win.PivotGrid

#Declaration

[DXCategory("Data")]
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(2)]
public PivotFilter ActiveFilter { get; }

#Property Value

Type Description
PivotFilter

A PivotFilter object that is a filter applied to data displayed in the PivotGridControl.

#Remarks

To learn more about filtering, see Filtering Overview.

Note

Filter Panel and Filter Editor display ActiveFilter if the following conditions are met:

#Example

The example below shows how to apply complex filter criteria in code using the PivotFilter.Criteria property. This property is exposed by the PivotFilter object that can be accessed using PivotGridControl.ActiveFilter.

using DevExpress.Data.Filtering;
// ...
            pivotGridControl.ActiveFilter.Criteria = new GroupOperator(GroupOperatorType.And,
                new InOperator(fieldTrademark.PrefilterColumnName, new string[] { "Chevrolet", "Chrysler", "Dodge", "Ford" }),
                new InOperator(fieldBodyStyle.PrefilterColumnName, new string[] { "Coupe" }));
See Also