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
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Providing Data
    [Collapse]Providing Data
      Manually Create a Series
      Manually Add Points to a Series
      Specify Series Data Members
      Automatic Series Creation
      Integration with a Data Grid, Vertical Grid, Tree List or List Box via ControlRowSource
      Pivot Charting (Integration with a Pivot Grid Control)
      Series Customization
      Series Scale Types
      Data Aggregation
      Colorizer
    [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [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]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

Integration with a Data Grid, Vertical Grid, Tree List or List Box via ControlRowSource

This topic explains how to populate a chart with a Data Grid's (Vertical Grid's, Tree List's or List Box's) data.

The following approaches are available:

Expanded Populate a chart at the design time

This section describes how to populate a chart with a Data Grid's data at design time.

  • Select a Chart Control instance, click its Smart Tag and click the Data Source Wizard item.

  • Locate the Control Row Source technology and click it, select the control that should provide its rows and click Next.

    Important

    The ControlRowSource is not available in the Toolbox. Only the Data Source Configuration Wizard can create a new instance of this class at design time.

    Note

    You can use the ControlRowSource control to provide a GridControl's, TreeListColumn's VGridControl's and ListBoxControl's data to a chart.

  • Select the type of rows the chart should visualize.

  • Select the data columns provided by a Row Control that the chart should use as the Series Member, Argument Member, and Value Member to generate series. Refer to the Series Template topic to learn more about series generation.

  • Click Finish to save changes.

After performing the previous steps, the chart visualizes the selected data rows.

Expanded Populate a chart at the runtime

You can connect a chart at runtime using the following code if it cannot be attached to a grid control at the design time:

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T554382.

The ControlRowSource component allows the Chart Control to visualize Grid data. To use the source component, create a new instance of it, configure its properties and assign it to the ChartControl.DataSource property.

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