Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Collapse]Query Builder
   [Expand]Getting Started
   [Expand]Visual Elements
    Binding to Data
    Obtaining the Resulting Query
    Localize 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]Document Server
[Expand]Reporting
[Expand]Report 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

This document provides information on how to bind the Query Builder control 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.

To specify a data connection to a Query Builder, do the following.

  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.

How would you rate this topic?​​​​​​​