Back to Devexpress

SearchStringToFilterCriteriaEventArgs.Filter Property

wpf-devexpress-dot-xpf-dot-grid-dot-searchstringtofiltercriteriaeventargs.md

latest2.7 KB
Original Source

SearchStringToFilterCriteriaEventArgs.Filter Property

Gets or sets the filter that is applied to the GridControl.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public CriteriaOperator Filter { get; set; }
vb
Public Property Filter As CriteriaOperator

Property Value

TypeDescription
CriteriaOperator

The filter that is applied to the GridControl.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Filter property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-bind-to-custom-service-with-restrictions/CS/MainWindow.xaml.cs#L137

csharp
if(!string.IsNullOrEmpty(e.SearchString))
    e.Filter = new BinaryOperator("Tags", e.SearchString.Trim().ToLower(), BinaryOperatorType.Equal);
e.ApplyToColumnsFilter = true;

wpf-data-grid-bind-to-custom-service-with-restrictions/VB/MainWindow.xaml.vb#L86

vb
Private Sub OnSearchStringToFilterCriteria(ByVal sender As Object, ByVal e As SearchStringToFilterCriteriaEventArgs)
    If Not String.IsNullOrEmpty(e.SearchString) Then e.Filter = New BinaryOperator("Tags", e.SearchString.Trim().ToLower(), BinaryOperatorType.Equal)
    e.ApplyToColumnsFilter = True

See Also

SearchStringToFilterCriteriaEventArgs Class

SearchStringToFilterCriteriaEventArgs Members

DevExpress.Xpf.Grid Namespace