The DevExpress ASP.NET Query Builder (ASPxQueryBuilder) allows you to provide your end users with the capability to visually construct database system-specific 'SELECT' statements. The resulting SQL string can then be obtained on the ASPxQueryBuilder.SaveQuery event via the SelectStatement event parameter.
In this demo, ASPxQueryBuilder is used to compose an MS Sql-specific 'SELECT' statement. The resulting query is executed against an MDF database using an SqlDataSource, and the data obtained as the result of the query execution is displayed in an ASPxGridView control.
To start customizing a 'SELECT' statement, click QUERY BUILDER above the grid view control.
Click the Save and Close button on the Query Builder toolbar to generate the SQL string and assign it to the data source control's SelectCommand property.