xpo-devexpress-dot-xpo-dot-xpbasecollection-2d228779.md
Gets or sets the criteria used to filter objects on the client side.
Namespace : DevExpress.Xpo
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
[Browsable(false)]
public CriteriaOperator Filter { get; set; }
<Browsable(False)>
Public Property Filter As CriteriaOperator
| Type | Description |
|---|---|
| CriteriaOperator |
A CriteriaOperator object that specifies the criteria to filter objects on the client side.
|
The XPBaseCollection.Criteria property specifies the criteria used to filter objects on the storage side. After objects that meet these criteria are retrieved to the XPBaseCollection, they are filtered again by the Filter criteria.
To disable the criteria specified by the Filter property set this property to null ( Nothing in Visual Basic).
Unlike the XPCollection’s XPBaseCollection.Criteria, Filter criteria can be built on non-persistent properties.
Note
For performance reasons, we recommend that you not use the JoinOperand when building criteria for the Filter property, as this significantly increases the number of queries sent to the server.
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.
var xpColl = new XPCollection<Order>(uow);
xpColl.Filter = criterion;
var result3 = xpColl.Count;
See Also