This is a migrated thread and some comments may be shown as answers.

Loading datasource shapes and connection from local data

1 Answer 46 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Nabil
Top achievements
Rank 1
Nabil asked on 29 May 2017, 12:27 PM

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, 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 31 May 2017, 08:15 AM

Hello Nabil,

I am afraid that this not possible with the Kendo UI Diagram for ASP.NET MVC. 

Regards,
Boyan Dimitrov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Diagram
Asked by
Nabil
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or