troubleshooting Question

Syncronizing TreeView and CustomDraw event

Avatar of twentysixpoint2
twentysixpoint2Flag for United States of America asked on
.NET ProgrammingC#
3 Comments1 Solution366 ViewsLast Modified:
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.
ASKER CERTIFIED SOLUTION
twentysixpoint2

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros