Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FilterBehavior.FilterCriteria Property

Gets or sets the filter expression applied to the FilterBehavior.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public CriteriaOperator FilterCriteria { get; set; }

#Property Value

Type Description
CriteriaOperator

The filter expression applied to the FilterBehavior.

#Remarks

Run Demo: FilterBehavior

Use the FilterString / FilterCriteria property to create a filter expression that consists of multiple conditions applied to multiple columns, and apply it to the FilterBehavior. Setting the FilterString / FilterCriteria property to a new value clears any filters that have been previously applied.

<dxfui:FilterBehavior x:Name="filterBehavior" 
                      ItemsSource="{Binding ElementName=chart, Path=DataSource}">
    <!-- -->                    
</dxfui:FilterBehavior> 
filterBehavior.FilterCriteria = (
    new BinaryOperator("Year", 2014, BinaryOperatorType.GreaterOrEqual) & 
    new BinaryOperator("Sales", 1, BinaryOperatorType.Greater)
); 

Use the ActualFilterCriteria property to get the filter criteria created by the FilterBehavior. You can assign this filter criteria to a data-bound control’s filter criteria or use it to filter your data in code.”

See Also