Hi,
I´m trying to remove a treenode from clientside with the following code:
I´m trying to remove a treenode from clientside with the following code:
function onClientContextMenuItemClicked(sender, args)
{
var menuItem = args.get_menuItem();
var treeNode = args.get_node();
switch(menuItem.get_value())
{
case "DeleteFolder":
var
tree = treeNode.get_treeView();
tree.trackChanges();
var parent = treeNode.get_parent();
parent.get_nodes().remove(treeNode);
tree.commitChanges();
break;
}
}
Which results in a runtime error:
Line 503:
Error:'null' is null or not an object.
Any Ideas on how to achive this?
Thank`s
Thomas