An operator which checks if a collection contains at least one object matching a specific criteria.
public sealed class ContainsOperator : AggregateOperand
Public NotInheritable Class ContainsOperator Inherits AggregateOperand
The ContainsOperator operator can be used to filter the contents of the XPCollection.
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.
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.