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

Query Builder

  • 2 minutes to read

ASP.NET Query Builder is an HTML5/JS based control that you can use to allow your end-users to create and edit SQL queries. As of the 17.2 release, the ASP.NET Query Builder control is on its CTP (Community Technology Preview) stage.

The rich user interface of the Query Builder allows fast and easy constructing of SQL queries. All elements of an SQL query are represented visually in the Query Builder interface and can be adjusted even by an end-user unfamiliar with SQL and its provider-specific dialects. The Query Builder control is capable of generating complex SELECT statements incorporating query clauses for data filtering, grouping, and sorting, which you can utilize to supply various data-aware web controls (such as Grid View or Chart Control) with data.

Note

Note that because the ASP.NET Query Builder is currently on its CTP stage, some aspects of its functionality described in this document may change in the release version.

Getting Started

asp-query-builder-feature-list-getting-started

To learn the basics of the DevExpress ASP.NET Query Builder, take a look at the following lessons.

Data Binding

asp-query-builder-feature-list-data-binding

The Query Builder is a data-aware control and requires a valid data connection to operate.

Using a connection to a database, the Query Builder control automatically obtains database schema information to populate its Tables List and resolves table relations based on foreign keys. Moreover, having access to database metadata, the Query Builder control is capable of generating queries in a provider-specific dialect of SQL.

Query Generation

asp-query-builder-feature-list-query-generation

As the result of its work, the Query Builder control produces a string containing the final SQL statement and a SelectQuery, which stores a high-level object model for a SQL query and can be reopened in the Query Builder for further editing if required. A final SQL query contains a ‘SELECT’ statement and optionally ‘WHERE’, ‘ORDER BY’ and ‘GROUP BY’ query clauses.

Visual Interface

asp-query-builder-feature-list-visual-interface

The Query Builder control provides a rich user interface, which includes the following visual elements.