ASP.NET MVC - Query Builder (v18.1)

ASP.NET Team Blog
11 April 2018

Use the powerful DevExpress Query Builder with your DevExpress ASP.NET MVC controls, with our upcoming v18.1 release!

The Query Builder component allows an end-user to visually build queries using our UI controls. This saves the end-user from learning and writing SQL statements. Once the queries are built, you can then apply those queries on existing DevExpress controls like the ASP.NET MVC GridView. This puts the power of ad-hoc querying in your end-users control.

Here's a screenshot of the MVC Query Builder control, click on the image for a larger version:

The Query Builder was first introduced as part of our XtraReports' Web Report Designer and then was released as a separate control for ASP.NET Web Forms. Many of you have requested this as an independent control for ASP.NET MVC and now it's available in v18.1 release.

Features

We've packed a ton of great features in the DevExpress ASP.NET MVC Query Builder:

  • The database schema is automatically obtained and displayed within the QueryBuilder's UI. You can also customize the database schema at runtime by implementing a custom schema provider to reduce the list of tables and views available for an end-user
  • Relationships between tables are automatically resolved based on foreign keys
  • An enhanced filter editor features the Advanced Mode allowing you to specify a filter string manually instead of using a visual editor. The code completion is available
  • Ability to visually shape retrieved data (sort, group and filter), which automatically edits 'ORDER BY', 'GROUP BY' and 'WHERE' query clauses
  • Ability to use the 'SELECT DISTINCT' clause
  • Aggregation of columns’ data
  • Preview entire SELECT statement
  • Preview the Query execution results

How do you plan to use the Query Builder in your ASP.NET MVC projects? Drop me a line below.

Thanks!


Email: mharry@devexpress.com

Twitter: @mehulharry

6 comment(s)
Abdul Qayyum 5
Abdul Qayyum 5

Hi it is must be avaiapble in WinForms controls also as separately

11 April, 2018
Anurag Mahato
Anurag Mahato

What about WPF

11 April, 2018
Manuel Grundner [DevExpress MVP]
Manuel Grundner [DevExpress MVP]

Nice! Will throw away my own Implementation after this Release! :)

11 April, 2018
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

@Abdul: We have the following Code Example demonstrating how to invoke Query Builder in WinForms app: www.devexpress.com/.../how-to-use-the-query-builder-in-a-winforms-application. Would you please check if the proposed solution meets your requirements?

@Anurag: I do recall you were asking this question in our Support Center and while the control is not available as a separate one, we have a solution in the www.devexpress.com/.../are-there-any-plans-to-add-the-new-asp-net-query-builder-to-wpf thread (we've also uploaded there an example with v17.2). Didn't you find this approach useful, or perhaps, there are some disadvantages?

@Manuel: Nice to hear that! Let us know about your experience once you are able to check this new control and do not hesitate to share any further improvement ideas with us.

13 April, 2018
Scott van der Linden
Scott van der Linden

Does the control round-trip?  i.e. can I provide it an SQL statement and have it generate the query design?

29 January, 2019
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

Hi Scott,

The Query Builder component operates only with Data Access Library internals, which are SelectQuery objects, and does not provide a way to load a raw SQL statement. These objects are queries designed with the help of the component and can be passed to a component using its Bind method. You can also check the ASPxQueryBuilder - How to open previously saved query thread describing how to store/load SelectQuery objects at the back-end.

30 January, 2019

Please login or register to post comments.