KendoUI Treeview with AngularJS uncheck checkboxes

2 posts, 1 answers
  1. Pieter-Jan
    Pieter-Jan avatar
    1 posts
    Member since:
    Apr 2015

    Posted 10 Apr 2015 Link to this post

    I'm using KendoUI (v2015.1.318) with AngularJS (v1.3.14). After every click on a node, the data will be fetched from an API. 
    After selecting some items and clicking on the button "add", the items will be added in a seperated list, the expanded treenodes must stay visible but all the 
    checked items must be unchecked. 

    After I iterated through the datasource to uncheck the checked items , I have call SetDataSource again. When I have expanded a lot of nodes and checked a few, the UI freezes some seconds while it's processing.

    I was wondering if there wasn't a more efficient way to execute this.

    I made an example without API call: 

    Plunker example

  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 13 Apr 2015 Link to this post

    Hello Pieter-Jan,

    Yes, you can call the dataItem set("checked", false) method to notify the model of the field change, and the TreeView will update automatically (this is the way the Kendo UI MVVM model works, which is a bit different than the AngularJS direct assignment). See the updated plunker here. Note that accessing the internal DataSource field _data is not supported, so I've updated the code to use the data() method.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top