I have a requirement in which I need to have an undo delete functionality in my treenode. If I delete a node from the tree, I should be able to undo this deletion.
The problem is that I am unable to add the node back to the same position as earlier. It gets added to the parent node as the last child node irrespective of its earlier position.
How to make use of UndoManager to achieve this? Currently I am not using UndoManager.
Please let me know, if you guys have any suggestion.