PivotGridControl.ActiveFilter Property
In This Article
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 |
---|---|
Pivot |
A Pivot |
#Remarks
To learn more about filtering, see Filtering Overview.
Note
Filter Panel and Filter Editor display Active
- the data source type is not OLAP
- the field’s area is not Data
Area (the PivotGrid is not PivotField Base. Area Area. )Data Area - no subscriptions for the Pivot
Grid eventControl. Custom Filter Popup Items - the Windows
Forms static option is not set to the FieldSettings. Column Filter Popup Mode Filter valuePopup Mode. Classic - the Pivot
Grid option is not set to the FieldOptions Filter Popup. Field Filter Popup Mode Filter valuePopup Mode. Classic
#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