Back to Devexpress

XPDataView.Filter Property

xpo-devexpress-dot-xpo-dot-xpdataview.md

latest2.1 KB
Original Source

XPDataView.Filter Property

Gets or sets the criteria used to perform client-side filtering of data view rows.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
[DefaultValue(null)]
public CriteriaOperator Filter { get; set; }
vb
<DefaultValue(Nothing)>
Public Property Filter As CriteriaOperator

Property Value

TypeDefaultDescription
CriteriaOperatornull

A CriteriaOperator object which specifies the criteria used to filter data view rows.

|

Remarks

To clear filtering, set the Filter property to null ( Nothing in Visual Basic).

Example

The following code snippet demonstrates filtering capabilities of the XPDataView. Filter criteria specified via the XPDataView.Filter and XPDataView.FilterString properties below, provide the identical functionality, and can be used interchangeably.

csharp
xpDataView1.Filter = CriteriaOperator.Parse("Age < 50");
xpDataView1.Filter = new BinaryOperator("Age", 50, BinaryOperatorType.Less);
xpDataView1.FilterString = "Age < 50";
vb
xpDataView1.Filter = CriteriaOperator.Parse("Age < 50")
xpDataView1.Filter = New BinaryOperator("Age", 50, BinaryOperatorType.Less)
xpDataView1.FilterString = "Age < 50"

See Also

FilterString

Filtering

XPDataView Class

XPDataView Members

DevExpress.Xpo Namespace