Hi David Gauthier,
You can persist the action in 2 variables - deletion
(boolean) and nodeToDelete
In the handler of the delete action (I would guess that this is the ClientContextMenuItemClicked handler) you check if the node is expanded. If it is - then it's pretty simple:
you get the child nodes (node.get_allNodes()) add them to it's parent and delete the node.
If the node is not expanded, then persist the action as stated above, expand the node (node.set_expanded(true)) and on ClientNodePopulated you check if "deletion" is true, if yes then perform A.
and set the flag (deletion
) back to false.
I hope the procedure was clear enough and you will not experience any hard time implementing it!
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items