All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DiagramSettings Class

Contains the Diagram extension settings.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v20.1.dll

Declaration

public class DiagramSettings :
    SettingsBase
Public Class DiagramSettings
    Inherits SettingsBase

Remarks

Pass the DiagramSettings object to a ExtensionsFactory.Diagram helper method to configure the Diagram extension.

@Html.DevExpress().Diagram(settings => {
    settings.Name = "Diagram";

    settings.BatchUpdateRouteValues = new { Controller = "DataBinding", Action = "NodesAndEdgesUpdate" };

    settings.Mappings.Node.Key = "ID";
    settings.Mappings.Node.Width = "Width";
    settings.Mappings.Node.Height = "Height";
    settings.Mappings.Node.Type = "Type";
    settings.Mappings.Node.Text = "Text";

    settings.Mappings.Edge.Key = "ID";
    settings.Mappings.Edge.FromKey = "FromID";
    settings.Mappings.Edge.ToKey = "ToID";
    settings.Mappings.Edge.Text = "Text";

    settings.Units = DevExpress.Web.ASPxDiagram.DiagramUnit.Px;
    settings.SettingsAutoLayout.Type = DevExpress.Web.ASPxDiagram.DiagramAutoLayout.Layered;
    settings.SettingsAutoLayout.Orientation = Orientation.Vertical;

}).Bind(Model.Objects, Model.Connections).GetHtml()

Online Demo

Diagram - Node and Edge Data Sources

Inheritance

Object
SettingsBase
DiagramSettings
See Also