Hi, I've a problem with the validation of an datetimeditor witch is in a tab of a tabControl.
I've a validating method on the udte.
When I update the udte value and I select another tab with utc_SelectedTabChanging or utc_ActiveTabChanging, the udte validating method is called 2 times when we use e.cancel = true in the validating method, and the utc_SelectedTabChanging or utc_ActiveTabChanging methods are never called.
My very simple test project :
http://www.sendspace.com/file/aguoca
I try that with :
Normal 0 21 false false false FR X-NONE X-NONE
//udte du formulaire
private void udte_Validating(object sender, CancelEventArgs e)
{
System.Diagnostics.Debug.WriteLine("udte_Validating");
e.Cancel = true;
}
And the event is fired 2 times when I change tab.
It's a bug and another good reason to update our software to your last version.
Thanks.
nb : "going to the Options tab" -> sry...
Hi,
For future reference, you can attach a file to your post here on the forums by going to the Options tab. You do not need to use an outside host - especially on that shows me ads. :)
Anyway, I took a look at your sample.
The first thing I did was update this sample to a newer version. The version this sample uses is more than 5 years old and I don't have it on my machine any more. So I updated it to the latest version which is 10.3.
The next thing I did is remove all of the breakpoints. Breakpoints are not a good way to test event firing, because hitting the breakpoint will cause Visual Studio to take focus away from your application and thus alter the test. So I removed all of the breakpoints you had applied and I put in a Debug.Writeline statement into the udte_Validating event so I can see when it fires.
Then I ran the app, changed the value of the UltraDateTimeEditor and clicked on Tab 2. The event only fires once.
So this may be a bug in the version you are using or it might be the result of your breakpoints.