Back to Devexpress

Lesson 1 - Add a Query Builder to a Web Application

aspnet-115129-components-query-builder-getting-started-lesson-1-add-a-query-builder-to-a-web-application.md

latest1.3 KB
Original Source

Lesson 1 - Add a Query Builder to a Web Application

  • Jul 20, 2024
  • 2 minutes to read

This lesson will teach you how to add a Query Builder to an ASP.NET Web Forms application.

To get started with this tutorial, create a new ASP.NET Web Forms application containing one Web Form. To add a Query Builder to the created web application, do the following.

  1. Select the default Web Form in the Solution Explorer and click the Design button to open the visual designer for this Web Form.

  2. Expand the DX.25.2: Data and Analytics Toolbox group and drop the ASPxQueryBuilder control onto the page.

  3. Next, provide the Query Builder with a data connection required to automatically obtain database schema information and properly generate data provider-specific SQL. To achieve this, add an XPO connection string for your database to the application’s Web.config file.

  4. In the application’s Web.config file, add the “resources” section as shown below.

  5. Run your web application to view the result. Use drag-and-drop to add a data table from the tables list to the current query.

See Also

Lesson 2 - Use the Resulting Query