[Expand]General Information
[Collapse]WinForms Controls
 [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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
    Getting Started
   [Expand]Diagram Control
   [Expand]End-User Interaction
   [Expand]Diagram Items
   [Expand]Automatic Layout
   [Collapse]Data Binding Functionality
     Generating Diagrams from a Data Source
     Generating Organization Charts
     Item Template Designer
    Themes and Styles
    Printing and Exporting
    Saving and Loading Diagrams
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Generating Diagrams from a Data Source

The DiagramDataBindingController class provides the data binding functionality for the DiagramControl. To bind the DiagramControl to data, open its Smart Tag panel and select Add DataBindingController.

To configure the data source, go to the diagramDataBindingController's Smart Tag.

The following table lists the properties used to map a diagram to data.

Member Description
(via DiagramDataBindingControllerBase.DataSource)
Specifies the path to a collection of diagram items.
DiagramDataBindingController.ConnectorsSource Specifies the path to a collection of objects that represent connectors.
DiagramDataBindingController.ConnectorFromMember Specifies the name of the data field that identifies the item to use as a connector's start item.
DiagramDataBindingController.ConnectorToMember Specifies the name of the data field that identifies the item to use as a connector's end item.

DiagramItem bindings can only get values from strongly typed objects. Therefore, to bind the diagram to a DataSet or DataTable source, handle the DiagramDataBindingControllerBase.UpdateItem event.


The Item Template Designer allows you to design templates for diagram items and connectors at design time.

The following example demonstrates the DiagramControl bound to sample data.

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