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

DXCollectionView.FilterExpression Property

Gets or sets the DXCollectionView‘s filter expression. This is a bindable property.

Namespace: DevExpress.Maui.CollectionView

Assembly: DevExpress.Maui.CollectionView.dll

NuGet Package: DevExpress.Maui.CollectionView

#Declaration

C#
public CriteriaOperator FilterExpression { get; set; }

#Property Value

Type Description
CriteriaOperator

A criteria operator that specifies a filter expression.

#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 build filter expressions, use Criteria Operators.

You can also set the FilterString 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:

Collection View - FilterString

using DevExpress.Data.Filtering;
//...
    collectionView.FilterExpression = new FunctionOperator(FunctionOperatorType.StartsWith, new OperandProperty("Name"), new ConstantValue("M"));
See Also