Skip to main content

CriteriaOperator.Parse(String, Object[]) Method

Converts the specified string, specifying an expression, to its CriteriaOperator equivalent.

Namespace: DevExpress.Data.Filtering

Assembly: DevExpress.Data.v14.2.dll

#Declaration

public static CriteriaOperator Parse(
    string criteria,
    params object[] parameters
)

#Parameters

Name Type Description
criteria String

A String value, that is the expression to convert.

parameters Object[]

The values that are substituted into the expression in place of question mark characters. These parameters can be omitted.

#Returns

Type Description
CriteriaOperator

A CriteriaOperator equivalent to the expression contained in criteria.

#Remarks

This example retrieves the orders from Spain with more than 40 units.


xpCollection1.Filter = CriteriaOperator.Parse("[Country] = ? AND [Quantity] > ?", "Spain", 40);

The image below shows the result:

Grid_GroupCriteria1

NOTE

The code example above uses positional parameters to format a criteria expression with values.

See Also