CriteriaOperator.Parse(String, Object[]) Method
In This Article
Converts the specified string, specifying an expression, to its CriteriaOperator equivalent.
Namespace: DevExpress.Data.Filtering
Assembly: DevExpress.Data.v14.2.dll
#Declaration
#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 |
---|---|
Criteria |
A 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:
NOTE
The code example above uses positional parameters to format a criteria expression with values.
See Also