Skip to content

DevExpress-Examples/diagram-for-mvc-tree-from-linear-data-structure-how-to-bind-to-an-in-memory-data-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diagram for MVC - Tree from Linear Data Structure - How to bind the extension to an in-memory data source

The DevExpress ASP.NET MVC Diagram extension can build a tree structure from a linear data structure.

Use the Bind(object nodeDataObject) method to bind the Diagram to the data source.

To transform a linear data structure to hierarchical, the data source should contain two additional fields:

  • The first field - assigned to the Mappings.Node.Key property and contains unique values.
  • The second field - assigned to the Mappings.Node.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.

The BatchUpdateRouteValues property specifies a Controller and Action that handle callbacks related to node and edge updates. When you update inserted items' data, use the MapInsertedItemKey method to provide key values for the items.

The SettingsAutoLayout property specifies the auto-layout algorithm and orientation the extension uses to build a diagram.

Files to Review

More Examples