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

Connection color from model

1 Answer 122 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Zoltan
Top achievements
Rank 1
Zoltan asked on 18 Jan 2016, 02:22 PM

Hello,

I need to set stroke color of individual connections between shapes depending on Model data from Controller.

 Is that possible with Html.Kendo() helper?

 

.DataSource(d => d
        .Read(read => read.Action("_SomeDiagram", "Diagram"))
        .Model(m => {
            m.Children("Entities");
            m.Id("Name"); }))  
.ConnectionDefaults(c => c.Stroke(s => s.Color("#979797").Width(2)))

 

ViewModel structure is simple with one root entity and three children.

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 21 Jan 2016, 01:19 PM
Hi,

We can use the connection redraw method to carry these changes after the widget is data bound.

See this snippet for reference. I hope this helps.

Regards,
T. Tsonev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Diagram
Asked by
Zoltan
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or