Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Binding to Data
     Binding to Data Overview
    [Expand]Data Source Configuration Wizard
    [Expand]OLAP Data Source
    [Expand]Database Server Mode
     Unbound Fields
     Local Data Stores
     Asynchronous Mode
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET 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]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to Data Overview

The PivotGridControl should be connected to an external data source that provides data you wish to display and process. You can bind a PivotGridControl to various types of data sources (an SQL database, an OLAP cube, an object, etc.).

To display data within the PivotGridControl, you need to create Pivot Grid fields that are used to visualize data from specific data source fields.

Note

The PivotGridControl is not automatically updated when the data source is modified. You need to call the PivotGridControl.RefreshData method that will forcibly reload the records in the data source.

Expanded Bind a Pivot Grid to Data at Design Time

To bind the PivotGridControl to data, click its smart tag and select one of the following options.

  • The Data Source Wizard command allows you to invoke the Data Source Configuration Wizard, which can be used to create various types of data sources.

  • The Choose Data Source combo box allows you to select the existing project data source.
    If necessary, you can create a new data source using the Add Project Data Source... command.

    This invokes the Data Source Configuration Wizard, which allows you to create and edit data sources in your application.

  • Choose OLAP Data Source allows you to connect to a cube in a Microsoft Analysis Services server. To learn more, see OLAP Data Source.

Expanded Bind a Pivot Grid to Data in Code

The PivotGridControl exposes the PivotGridControl.DataSource and PivotGridControl.DataMember properties used to specify the data source/data member for the Pivot Grid. Note that the PivotGridControl.DataMember property is in effect when a data source (e.g., a DataSet object) contains several lists/tables. To bind the Pivot Grid to data in this case, set its PivotGridControl.DataSource property to the aggregated data source and set its PivotGridControl.DataMember property to the name that identifies the required table.

Note

The following topic lists typical data sources to which the data-aware DevExpress controls can be bound: Traditional Data Binding Methods.

To learn how to bind PivotGridControl to various types of data sources in code, see examples from the Data Source Configuration Wizard section.

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