I'm using an UltraDockManager with several DockableControlPanes in a group. I also have validation on each form in my controls' Validating events.
The problem is that all the Validating events are triggered when I select another non-floating tab. If the validation fails, it displays a messagebox but it shows the new tab. More seriously the Validating events are run even when the controls are disabled.
1. I would like to trigger the Validating event only for the current control, not the others.
2. If the validation fails, I want to cancel the selection of the new tab.
We are still following your forum thread. Have you been able to look at the provided sample ?If you have any other questions or if you still need further assistance please feel free to let us know.
I was away last week, just got back.
The problem with the sample is I'm not using a DockableWindow.
I have the main grid docked at the top of the screen with the other tabs docked at the bottom. Here's how I create my controls.
1. Add an UltraDockManager to my parent form.
2. Using code,
At the moment I'm attempting to split the validation between the Leave and Validating events so the Leave runs the actual validation and the Validating cancels if the validation failed. Then I don't need to stop the Validating event firing.
I`m not sure that I understand your scenario. Could you please try to provide us more details about your scenario and final goal or if you are able please modify attached sample (from my colleague in the previous post) to reproduce your scenario and revert it back to us. I`ll be glad to research it.
Let me know if you have any questions.