Back to Devexpress

PivotGridField.FilterType Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-543238aa.md

latest2.6 KB
Original Source

PivotGridField.FilterType Property

Gets or sets a field’s filter type.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public FieldFilterType FilterType { get; set; }
vb
Public Property FilterType As FieldFilterType

Property Value

TypeDescription
FieldFilterType

A FieldFilterType enumeration member that specifies the filter type.

|

Available values:

NameDescription
Excluded

Specifies that the DXPivotGrid control should not display the filter values. All the other values will be displayed.

| | Included |

Specifies that the DXPivotGrid control should display only the filter values.

|

Remarks

If the FilterType property is set to Included , only the data source records that correspond to one of the filter values will be processed. Otherwise, the PivotGrid control will processes only the data source records that do not correspond to any filter value.

The following example shows how to filter the Category field by the “Produce” and “Seafood” values. For this, add these values to the PivotGridField.FieldFilterValues collection and set a filter type using the FilterType property.

csharp
public MainWindow() {
    List<object> filterValues = new List<object>();
    filterValues.Add("Produce");
    filterValues.Add("Seafood");

    fieldCategory.FilterType = DevExpress.Xpf.PivotGrid.FieldFilterType.Included;
    fieldCategory.FieldFilterValues = filterValues;
}
vb
Public Sub New()
    Dim filterValues As New List(Of Object)()
    filterValues.Add("Produce")
    filterValues.Add("Seafood")

    fieldCategory.FilterType = DevExpress.Xpf.PivotGrid.FieldFilterType.Included
    fieldCategory.FieldFilterValues = filterValues
End Sub

See Also

PivotGridField Class

PivotGridField Members

DevExpress.Xpf.PivotGrid Namespace