XPBaseCollection.Criteria Property
Gets or sets the criteria used to filter objects on the data store side.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Property Value
Type | Description |
---|---|
CriteriaOperator | A CriteriaOperator object that specifies the criteria to filter objects on the data store side. |
Remarks
Use the Criteria property in order to change the criteria by which the persistent objects will be filtered during collection loading on the storage side. If you change this property’s value, the collection is refreshed immediately. But if you change any of its criteria members, you must call the XPBaseCollection.Reload method in order to force loading. To temporarily prevent a collection from loading/reloading data use the XPBaseCollection.LoadingEnabled property.
For examples and additional information about filter expressions, see these help topics:
- How to: Build Simple Criteria
- How to: Build Complex Criteria
- Build Criteria - Cheat Sheet
- Filtering
- Criteria Language Syntax
Note
Unlike the XPCollection’s XPBaseCollection.Filter, Criteria can be built on persistent properties only.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Criteria 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.