Search code examples
jquerykendo-uidiagram

How to delete / remove a connection present between two shapes in Kendo Diagram.?


var diagram = $("#diagram").getKendoDiagram();
var connId = diagram.connections[i].id;

How can I delete a connection present in between two shapes in Kendo Diagram. I can get id of that connection and from/to it is connected.


Solution

  • You can delete a connection in the diagram by passing its object to the diagram.remove function. Like.

    var diagram = $("#diagram").getKendoDiagram();
    var conn = diagram.connections[0];
    diagram.remove(conn);

    Example is at https://dojo.telerik.com/IBAlIXov