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

Updating the text of a node

1 Answer 203 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 06 Mar 2014, 12:38 PM
Hi all,

I am trying to update the text of a node without having to refresh the whole tree. 
Is this possible?

I have tried unsuccessfully with the following:
var treeview = $("#ProcessTree").data("kendoTreeView");
var node = treeview.dataItem(treeview.select());
node.Name = "Updated Text";
treeview.collapse(node);
node.loaded(false);
node.load();
treeview.expand(node);

Thanks,
Keith. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 06 Mar 2014, 03:36 PM
Hello Keith,

Use the following:

var treeview = $("#ProcessTree").data("kendoTreeView");
var node = treeview.dataItem(treeview.select());
node.set("Name", "Updated Text");

This will trigger the TreeView binding.

Regards,
Alex Gyoshev
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Tags
TreeView
Asked by
Keith
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or