Hi
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.
Thanks
John
Hello John,
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.
Regards
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.
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.
Hello ,
In order to prevent changing of the current active pane you could cancel validating event of the inner control.
When you change active pane DocableWindow validates its child, so the validating event was called for all child control, like this.ValidateChildren();. So my suggestion is to use ErrorProvider for example, because displaying of Message box could cause changing of a focus, which could lead validating event to be fired more than once. I have implemented my suggestion in a small sample. Please see the attached sample and let me know if this is what you are looking for.
Thank you for using Infragistics Components.