[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Collapse]Query Builder
   [Expand]Getting Started
    Binding to Data
    Selecting Tables
    Joining Tables
   [Expand]Shaping Data
    Previewing Results
    Obtaining the Resulting Query
    Localizing the Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to Data

The Query Builder control requires a valid data connection to obtain database schema information as well as to generate the resulting query in a proper SQL dialect.

Do the following to specify a data connection to a Query Builder:

  1. Add an XPO connection string specifying a valid connection to the required database to the project's Web.config file as shown below.

  2. In the Page_Load event handler, pass the name of the added connection string to the Query Builder control's ASPxQueryBuilder.OpenConnection method.

  3. The Query Builder control is now bound to data. You can run your web application and view the result. The database schema will be automatically obtained from the database and reflected by Query Builder's lists of the available data tables.

Is this topic helpful?​​​​​​​