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

[Solved] Remove tree nodes through OnContextMenuItemClick callback.

1 Answer 90 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 28 Feb 2008, 07:18 PM
I have a RadTreeView control with  a RadTreeViewContextMenu control inside.  The server side callback for this menu should delete a node when the delete menu item is clicked.  I have tried both

selected.ParentNode.Nodes.Remove(selected);
and
selected.Remove();

inside of the OnContextMenuItemClick handler, but neither method removes the node on the client side.  Is there a correct way to remove nodes through a callback?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 29 Feb 2008, 04:41 PM
Hello Josh,

I am attaching a project that shows how to remove a TreeView node on OnContextMenuItemClick.

Please let us know if this is not what you are trying to achieve.

Regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Josh
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or