Refreshing TreeView Manually

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

    Posted 24 Oct 2014 Link to this post

    I am using the Kendo TreeView with pure JavaScript, no JSP or ASP.NET involved.

    My TreeView is 4 levels deep. The actual formatting of the nodes is accomplished using the template language.

    I have a need to (potentially) change the information displayed for each node as the selection is changed. I have created my own onSelect event handler to do this. Specifically, what I need is to change a node's descendant nodes recursively based upon the value of the node.Nodes that have never been expanded can be ignored since this is handled by a different mechanism, only the loaded nodes need to be modified.

    I know that I can recursively modify the value of each descendant node's DataItem to contain the updated information but this modification is not reflected in the browser. I apparently need to have some way to trigger the page renderer to rerun the template code to redraw each node.

    Is there any way I can accomplish this?
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 28 Oct 2014 Link to this post

    Hello StevenDm,

    I am cannot say for sure why the modifications do not reflect in the browser without examining the code first. Getting the data items and using their set method however, should work as expected (see example).

    Regards,
    Alexander Popov
    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