FilterEditorControl.ApplyFilter() Method

Applies the filter criteria to the source control the FilterEditorControl is bound to.

Namespace: DevExpress.Xpf.Core.FilteringUI

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

Declaration

public void ApplyFilter()
Public Sub ApplyFilter

Remarks

TIP

Corresponding command: FilterEditorCommands.ApplyFilter

The filter criteria specified in the Filter Editor are not automatically applied to the source control. To apply the current filter criteria to the source control, use the ApplyFilter method.

TIP

Set the RespondToContextFiltersChanges property to true to make the FilterEditorControl respond to the source control's filter changes.

Example

The code sample below shows the FilterEditorControl bound to the GridControl. The ApplyFilterButton with the FilterEditorCommands.ApplyFilter command allows you to apply filter criteria specified in the FilterEditorControl to the GridControl.

<dxfui:FilterEditorControl x:Name="filterEditor" Context="{Binding Path=FilteringContext, ElementName=filterGrid}"/>
<!-- ... -->
<Button Name="ApplyFilterButton" Content="Apply Filter" 
        Command="{Binding Commands.ApplyFilter, ElementName=filterEditor}" />
<!-- ... -->
<dxg:GridControl x:Name="filterGrid" ... />
See Also