Skip to main content
.NET Framework 4.6.2+

XPBaseCollection.Criteria Property

Gets or sets the criteria used to filter objects on the data store side.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.2.dll

#Declaration

public CriteriaOperator Criteria { get; set; }

#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:

Note

Unlike the XPCollection’s XPBaseCollection.Filter, Criteria can be built on persistent properties only.

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.

See Also