Skip to main content
A newer version of this page is available. .

XpoDataSource.CriteriaParameters Property

Provides access to the collection of parameter values that are used to build the data source control’s filter criteria.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v18.2.dll

Declaration

[PersistenceMode(PersistenceMode.InnerProperty)]
[DefaultValue(null)]
public ParameterCollection CriteriaParameters { get; }

Property Value

Type Default Description
ParameterCollection *null*

A ParameterCollection object that stores the filter criteria’s parameter values.

Remarks

This property is in effect only if the criteria specified via the XpoDataSource.Criteria property contains question marks indicating parameter placeholders.

The following code snippet demonstrates how to specify parameter values via the CriteriaParameters property.


XpoDataSource1.CriteriaParameters.Add("Category", "Saloon");
XpoDataSource1.CriteriaParameters.Add("Price", "100000");

The following criteria refers to these parameter values. The first question mark is a placeholder for Category and the second - for Price.


XpoDataSource1.Criteria = "[Category] = ? AND [Price] < ?";

Note

Changing CriteriaParameters contents immediately refreshes the data source control.

See Also