Hi,
I have a "Rneame" context menu on my treeview that gets handled client-side and initiates node.startEdit(); The node goes into edit mode & the user can edit the text and hit enter and all looks fine on-screen.
The problem come during postback though - the node in code-behind still has the old name?
function
tvwListData_ClientContextMenuItemClick(sender, args) {
var
tree = $find(
"<%= tvwListData.ClientID %>"
);
var
node = args.get_node();
tree.trackChanges();
var
item = args.get_menuItem();
switch
(item.get_value()) {
case
"Rename"
:
node.startEdit();
break
;
case
"Delete"
:
node.get_parent().get_nodes().remove(node);
break
;
}
tree.commitChanges();
}