Problem with remove item from datasource

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Nov 2012

    Posted 20 Jul Link to this post


    In this sample code i try to delete shape by remove item from diagram datasource,

    but after the delete the 2 shapes remain in the diagram and in the datasource only 1.


    <!DOCTYPE html>
        <meta charset="utf-8"/>
        <title>Kendo UI Snippet</title>

        <link rel="stylesheet" href=""/>
        <link rel="stylesheet" href=""/>
        <link rel="stylesheet" href=""/>
        <link rel="stylesheet" href=""/>

        <script src=""></script>
        <script src=""></script>
    <div id="diagram"></div>
        dataSource: [{
           "name": "Telerik",
           "items": [
               {"name": "Kendo"},
               {"name": "Icenium"}
        template: "#= #",
        autoBind: false

    // Fetching data will trigger "change" on the dataSource
    var datasource = $("#diagram").getKendoDiagram()[0];

      alert(datasource.items.length); //2
      alert(datasource.items.length); //1

  2. Vessy
    Vessy avatar
    1382 posts

    Posted 22 Jul Link to this post

    Hi Daniel,

    Calling the diagram's refresh() method will force the rebinding of the diagram with the changed datasource. You can find the updated version of your sample here:

    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  3. Kendo UI is VS 2017 Ready
Back to Top