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.v20.2.dll

Declaration

public ContainsOperator(
    string collectionProperty,
    CriteriaOperator condition
)
Public Sub New(
    collectionProperty As String,
    condition As CriteriaOperator
)

Parameters

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.

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:

ContainsOperator

xpCollection1.Filter = new ContainsOperator("Addresses", new BinaryOperator("City", "Chicago"));
//or
xpCollection1.Filter = CriteriaOperator.Parse("[Addresses][[City] = ?]", "Chicago");
See Also