windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-638ce454.md
Provides access to settings of the filter applied to the PivotGridControl‘s data.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
[DXCategory("Data")]
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
[XtraSerializablePropertyId(2)]
public PivotFilter ActiveFilter { get; }
<XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)>
<XtraSerializablePropertyId(2)>
<DXCategory("Data")>
Public ReadOnly Property ActiveFilter As PivotFilter
| Type | Description |
|---|---|
| PivotFilter |
A PivotFilter object that is a filter applied to data displayed in the PivotGridControl.
|
To learn more about filtering, see Filtering Overview.
Note
Filter Panel and Filter Editor display ActiveFilter if the following conditions are met:
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" }));
Imports 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