Connection color from model

2 posts, 1 answers
  1. Zoltan
    Zoltan avatar
    6 posts
    Member since:
    Feb 2012

    Posted 18 Jan 2016 Link to this post


    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.Id("Name"); }))  
    .ConnectionDefaults(c => c.Stroke(s => s.Color("#979797").Width(2)))


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

  2. Answer
    T. Tsonev
    T. Tsonev avatar
    2817 posts

    Posted 21 Jan 2016 Link to this post


    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.

    T. Tsonev
    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
Back to Top