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
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:
using DevExpress.Data.Filtering;
//...
collectionView.FilterExpression = new FunctionOperator(FunctionOperatorType.StartsWith, new OperandProperty("Name"), new ConstantValue("M"));