Skip to main content

ContainsOperator(String, CriteriaOperator) Constructor

Initializes a new instance of the ContainsOperator class with the specified property and criteria expression.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data


public ContainsOperator(
    string collectionProperty,
    CriteriaOperator condition


Name Type Description
collectionProperty String

A String value which identifies the property whose values will be searched.

condition CriteriaOperator

A CriteriaOperator object that represents a search criteria.


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"));
xpCollection1.Filter = CriteriaOperator.Parse("[Addresses][[City] = ?]", "Chicago");
See Also