Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Tree from Linear Data Structure

v
po
po
x
Text
v
v
po
Object
Line style
v
Line width
x
+
-
popo
Connector
Type
v
Start
v
End
v
Layered




Tree




Page
Size
v
Orientation
v
po

The DevExpress ASP.NET Diagram (ASPxDiagram) control can transform a linear data structure to a tree-like diagram.

The NodeDataSourceID property specifies which data source the control is bound to. To transform a linear data structure to hierarchical, the data source should contain two additional fields:

  • The first field - assigned to the Key property and contains unique values.
  • The second field - assigned to the ParentKey property and contains values that indicate the current node's parent nodes.

You can bind other node settings to the data source. Assign field values to the corresponding settings in the Mappings.Node property.

To use a data source, handle the NodeInserted event to specify key values for new nodes.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxDiagramDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxDiagramDemos