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.v20.2.dll
Declaration
public sealed class ContainsOperator :
AggregateOperand
Public NotInheritable Class ContainsOperator
Inherits AggregateOperand
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.
Examples
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");
Inheritance
Object
CriteriaOperator
AggregateOperand
ContainsOperator
See Also
Feedback