SelectedDocumentChanged Problem.

Docking/MDI for Windows Forms Forum

Posted 15 years ago by Josh Shepherd - Consultant, Shepherd
Version: 2.0.0105
Avatar
Issue: I have 5 documents docked. I want to check if there is unsaved data on a form before a user moves on to another tab.

I am trying to use SelectedDocumentChanged and check for unsaved data flag, then set
the active document back to the previous one within the SelectedDocumentChanged event.

This works, but if a user then goes back to the same 2nd document they tried to go to the first time, again without saving, the event SelectedDocumentChanged does not fire. If I go to any different tabs it works fine.

Is there a a way to fix this? Is there a better/different way to cancel a document change?

Please Help! I have searched the forums a LOT on this and not found an exact solution yet.

Josh

Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Josh,

I have an idea of why this could be happening, it's due to your change causing a nested SelectedDocumentChanged within the code that raises the event.

If you could supply a simple project that reproduces the issue, we can make a change in this area to see if it helps resolve it. Just email our support team with it. Thanks!


Actipro Software Support

Posted 15 years ago by Josh Shepherd - Consultant, Shepherd
Avatar
I have sent a copy of source code in a vs2005 vb app to you as an example to support@ address. Please let me know what you find out!
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Josh,

It looks like the change we had in mind does resolve it.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.