Back to Devexpress

DXCollectionView.FilterString Property

maui-devexpress-dot-maui-dot-collectionview-dot-dxcollectionview-e75dcd4a.md

latest2.2 KB
Original Source

DXCollectionView.FilterString Property

Gets or sets the CollectionView’s filter expression string. This is a bindable property.

Namespace : DevExpress.Maui.CollectionView

Assembly : DevExpress.Maui.CollectionView.dll

NuGet Package : DevExpress.Maui.CollectionView

Declaration

csharp
public string FilterString { get; set; }

Property Value

TypeDescription
String

A string that specifies a filter criteria applied to data the DXCollectionView displays.

|

Remarks

When you apply a filter, the view displays a subset of items that meet the specified criteria. You can filter data in the DXCollectionView against single or multiple data fields.

To create filter expression strings, use Criteria Language.

You can also set the FilterExpression property to specify a filter expression. Note that the FilterExpression and FilterString properties are dependent. If you update one of them, the other changes as well.

Call the CriteriaOperator.Parse method to convert a filter string to its CriteriaOperator equivalent.

Example

The following example filters out persons whose name starts with the letter M:

xaml
<dxcv:DXCollectionView ItemsSource="{Binding Recents}"
                       FilterString="StartsWith([Name], 'M')">
    <!-- ... -->
</dxcv:DXCollectionView>

See Also

Filter, Sort, and Group Data in Collection View for .NET MAUI

DXCollectionView Class

DXCollectionView Members

DevExpress.Maui.CollectionView Namespace