windowsforms-devexpress-dot-xtrapivotgrid-3070f751.md
A filter applied to data displayed in the PivotGridControl.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.XtraPivotGrid.v25.2.dll
NuGet Package : DevExpress.Win.PivotGrid
public class PivotFilter :
PivotFilterBase,
IFilterFormOwner,
IUIFilterSource,
IXtraSerializable
Public Class PivotFilter
Inherits PivotFilterBase
Implements IFilterFormOwner,
IUIFilterSource,
IXtraSerializable
The following members return PivotFilter objects:
Use the PivotGridControl.ActiveFilter property to access filter settings of the PivotGridControl.
To learn more about filtering, see Filtering Overview.
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"}))
Object DevExpress.Utils.Controls.DisposableObject BaseFilter PivotFilterBase PivotFilter
See Also