Our application uses a treeview as its menu structure. Certain nodes in the tree represent forms that can be opened by clicking on the node. I have an issue with synchronizing the treeview when navigation to a target form is canceled. For example:
User updates FormA
User clicks the treenode that will cause them to navigate to FormB
Before FormB is opened, FormA is checked for updates
User is prompted to Save, Ignore, or Cancel updates
Cancel returns user to FormA and Form B is never opened
The problem is that the treeview will highlight FormB but FormA is still open.
I have a method that I call to synchronize the treeview to the form that is open. The method actually works but my custom DrawNode event fires at the end of all the processing and relselects the node that was clicked on.
Is there any way that I can cancel the DrawNode event or is there an event that is fired after the DrawNode that I can hook into? This is really driving me nuts.