Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
690
TabControl and DateTimeEditor Validating
posted

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

Parents
  • 469350
    Offline posted

    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. 

Reply Children
No Data