Back to Devexpress

PivotFilter Class

windowsforms-devexpress-dot-xtrapivotgrid-3070f751.md

latest3.2 KB
Original Source

PivotFilter Class

A filter applied to data displayed in the PivotGridControl.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public class PivotFilter :
    PivotFilterBase,
    IFilterFormOwner,
    IUIFilterSource,
    IXtraSerializable
vb
Public Class PivotFilter
    Inherits PivotFilterBase
    Implements IFilterFormOwner,
               IUIFilterSource,
               IXtraSerializable

The following members return PivotFilter objects:

Remarks

Use the PivotGridControl.ActiveFilter property to access filter settings of the PivotGridControl.

To learn more about filtering, see Filtering Overview.

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.

csharp
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" }));
vb
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"}))

Inheritance

Object DevExpress.Utils.Controls.DisposableObject BaseFilter PivotFilterBase PivotFilter

See Also

PivotFilter Members

Pop-up Filter

DevExpress.XtraPivotGrid Namespace