Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes

Data Source Expressions

  • And
    • PriceIs less than

The currently composed filter expression: ([Price] < 500000)
FirstPrevPage 1 of 4NextLastAll
328 S Kerema Ave, Milford, CT 06465
Price: $350,000.00
House Size: 8356
YearBuilt: 2010
Beds: 4
Baths: 2
5119 Beryl Dr, San Antonio, TX 78212
Price: $455,000.00
House Size: 7980
YearBuilt: 2007
Beds: 4
Baths: 2
8512 Tanglewood Cir, Reform, AL 35487
Price: $250,000.00
House Size: 5600
YearBuilt: 2011
Beds: 3
Baths: 2
1198 Theresa Cir, Whitinsville, MA 01582
Price: $320,000.00
House Size: 4990
YearBuilt: 2011
Beds: 4
Baths: 3
FirstPrevPage 1 of 4NextLastAll

This demo illustrates the ability to generate database system-specific filter expressions using the DevExpress ASP.NET Filter Control (ASPxFilterControl). The ASPxFilterControl provides the following methods whose return values can be used as filter expressions ('WHERE' clauses) for the corresponding data source types:

In addition, the obtained filter expression can be validated for completeness using the IsFilterExpressionValid method, which is available both on the server and client sides. This method checks whether or not all expression conditions are filled, and indicates if it is safe to apply the expression.

In this demo, a standalone ASPxFilterControl is used to compose MS Sql-specific filter criteria. These criteria are applied to data that is obtained from an object using an ObjectDataSource, and displayed by an ASPxDataView control

The text of the filter expression being composed is displayed by a label below the ASPxFilterControl. If a filter expression is not valid, this is indicated by the corresponding label text.

Clicking the Apply button validates the current filter expression, generates filter criteria by the GetFilterExpressionForDataSet method call, and applies a filter expression to the data source control's FilterExpression property.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos