Hello,
Is it possible to fill the datasource of shapes and the datasource connection without using read method for both datasources, like in grid when loading local data ?
@(Html.Kendo().Diagram(Model.Ds, Model.DsCnx)
.Name("diagram")
.DataSource(d => d
.ShapeDataSource()
.Model(m =>
{
m.Id(s => s.Id);
m.Field(s => s.Id).Editable(false);
m.Field(s => s.Name).Editable(false);
m.Field(s => s.CodeMst).Editable(false);
m.Field(s => s.NbEl).Editable(false);
m.Field(s => s.NbImbCode).Editable(false);
m.Field(s => s.ObjType).Editable(false);
m.Field(s => s.ObjectId).Editable(false);
})
)
.ConnectionsDataSource(d => d
.Model(m =>
{
m.Field(c => c.From);
m.Field(c => c.To);
})
)
.Events(e => e.DataBound("onDataBound"))
.Layout(l => l
.Type(DiagramLayoutType.Tree)
.LayerSeparation(50)
.Subtype(DiagramLayoutSubtype.Right)
.NodeDistance(20)
)
.Editable(true)
.ShapeDefaults(sd => sd
.Visual("visualTemplate")
)
.Pannable(true)
.Zoom(0.7)
)
Best regards,