FilterBehavior.ActualFilterCriteria Property

Gets 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.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v20.1.dll

Declaration

public CriteriaOperator ActualFilterCriteria { get; }
Public ReadOnly Property ActualFilterCriteria As CriteriaOperator

Property Value

Type Description
CriteriaOperator

The filter criteria created by the FilterBehavior.

Remarks

The following code sample shows how to use the FilterBehavior to allow the Filter Elements to work with the ListBoxEdit.

<dxe:ListBoxEdit Name="listBoxEdit" ItemsSource="{Binding Products}"
                 FilterCriteria="{Binding ElementName=filterBehavior, Path=ActualFilterCriteria}"/>

<!-- -->    

<dxfui:CheckedListFilterElement FieldName="CategoryName">
    <dxmvvm:Interaction.Behaviors>
        <dxfui:FilterBehavior x:Name="filterBehavior" ItemsSource="{Binding ElementName=listBoxEdit, Path=ItemsSource}">
            <dxfui:FilterField FieldName="CategoryName">
                <dxe:ComboBoxEditSettings ItemsSource="{Binding Categories}"/>
            </dxfui:FilterField>
        </dxfui:FilterBehavior>
    </dxmvvm:Interaction.Behaviors>
</dxfui:CheckedListFilterElement>
TIP

Demo: FilterBehavior

Requires a WPF Subscription. Download

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.

See Also