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

Cannot remove node from clientside

2 Answers 31 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, 03:42 PM
Hi,

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

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 17 Sep 2008, 04:30 PM
Hi Thomas,

I couldn't reproduce the problem using the current official release of RadControls for ASP.NET Ajax. Please find attached my test page. Let me know if I am missing something.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Thomas
Top achievements
Rank 1
answered on 17 Sep 2008, 04:42 PM
Now it´s working... must be something messed up.

Thank`s for your help anyway.
Thomas
Tags
TreeView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or