ContainsOperator Class
An operator which checks if a collection contains at least one object matching a specific criteria.
Namespace: DevExpress.Data.Filtering
Assembly: DevExpress.Data.v18.1.dll
Declaration
Remarks
The ContainsOperator operator can be used to filter the contents of the XPCollection.
It’s also possible to use the CriteriaOperator.Parse method to create a CriteriaOperator operator for a specific expression.
Example
This sample code selects Person objects that contain at least one object in their Addresses collection property with the City property set to “Chicago”
The image below shows the result:
xpCollection1.Filter = new ContainsOperator("Addresses", new BinaryOperator("City", "Chicago"));
//or
xpCollection1.Filter = CriteriaOperator.Parse("[Addresses][[City] = ?]", "Chicago");
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ContainsOperator class.
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.