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

How to commit changes of editing a node without roundtrip

1 Answer 32 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 17 Sep 2008, 05:00 PM
Hi again :-)

How do I commit changes of editing a node without a server roundtrip
only by the click on a save button?

Thank`s
Thomas

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Sep 2008, 02:22 PM
Hi Thomas,

You can use the following javascript code to commit changes of editing a node:

var tree = $find("<%= TreeView1.ClientID %>");  
tree.trackChanges();  
for (var i=0; i<tree.get_nodes().get_count();i++)     
{           
   var node = tree.get_nodes().getNode(i);           
   node.set_text(node.get_text());     
}  
tree.commitChanges(); 

Best wishes,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or