This is a migrated thread and some comments may be shown as answers.

Refreshing TreeView Manually

1 Answer 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
StevenDom
Top achievements
Rank 1
StevenDom asked on 24 Oct 2014, 07:27 PM
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?

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 28 Oct 2014, 01:56 PM
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!
 
Tags
TreeView
Asked by
StevenDom
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or