DiagramSettings.Mappings Property

Provides access to the control's mapping properties.

Namespace: DevExpress.Web.Mvc

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

Declaration

public DiagramMappings Mappings { get; }
Public ReadOnly Property Mappings As DiagramMappings

Property Value

Type Description
DiagramMappings

An object that contains mapping properties.

Remarks

Run Demo: Data Binding

Example

@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()
See Also