Skip to main content

dxDiagram

Namespace: Wisej.Web.Ext.DevExtreme

Assembly: Wisej.Web.Ext.DevExtreme (4.1.0.0)

The Diagram widget provides a visual interface to help you design new and modify existing diagrams.

public class dxDiagram : dxBase

Constructors​

Instance member dxDiagram()​

Constructs a new instance of the dxDiagram class.

Example:

The following example creates a diagram that builds an organization chart from a list of employees.

var diagram = new dxDiagram();
diagram.Options.nodes = new
{
dataSource = employees,
keyExpr = "id",
textExpr = "name",
parentKeyExpr = "managerId",
autoLayout = new { type = "tree" }
};
diagram.Options.readOnly = true;
diagram.Dock = DockStyle.Fill;
this.Controls.Add(diagram);

Instance member dxDiagram(options)​

Constructs a new instance of the dxDiagram class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a diagram that loads its shapes and connectors from two in-memory lists.

var diagram = new dxDiagram(new
{
nodes = new
{
dataSource = new[]
{
new { id = 1, text = "Order received" },
new { id = 2, text = "Order shipped" }
},
keyExpr = "id",
textExpr = "text"
},
edges = new
{
dataSource = new[] { new { id = 10, fromId = 1, toId = 2 } },
keyExpr = "id",
fromExpr = "fromId",
toExpr = "toId"
}
});
diagram.Dock = DockStyle.Fill;
this.Controls.Add(diagram);

Implements​