Removing Tree Nodes

2 posts, 0 answers
  1. StevenDom
    StevenDom avatar
    14 posts
    Member since:
    Aug 2014

    Posted 07 Nov 2014 Link to this post

    I have a TreeView with 4 levels of nodes. Here is my scenario

    1) Expand the tree tree along one path all the way down to the leaf nodes.
    2) Now I need to go back to the second level node and remove all child branches so that the next time I expand this node the data is reread from the database.

    Currently if I just collapse the second level node the data will remain on the client and not be refreshed from the database.

    How can I do this? There seems to be multiple ways to prune / destroy / remove / detach a branch of nodes and I am unsure which will force a reread from the database.

    Or is there a way to instruct the treeview to always reread from the database when a node is expanded?


  2. Alex Gyoshev
    Alex Gyoshev avatar
    2513 posts

    Posted 10 Nov 2014 Link to this post

    Hello Steven,

    In order to force a reload of nodes, set the loaded flag of the dataItem to false. See the example of the Node loaded method.

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top