Thanks again, that is a good start. The problem is to cancel the OK button when the value is invalid. Actually the UltraNumericEditor changes the value from 0 back to 1, just before the OK button triggers. So my form always reports 1 to its parent form when the user entered any invalid value and clicked OK.
Edit: Found another issue: When clicking ok the Event will be fired, but not when pressing enter to confirm the ok button...
It may be a bit of a workaround but you can set the e.RetainFocus property to false in the ValidationError event handler and this will allow the Cancel button to operate. Of course, this means any other control will be able to work too.
Hi Andy,
thank you for your answer. It seems that the value of the CausesValidation property has no effect to the Control. As soon as I enter a number out of the valid range, the control still blocks the cancel button. The only way to close the form is using the close button (X)..
PS: Wuhuuu, at least my line feeds in my posts seem to work when using the IE7 instead of Google Chrome
Hopefully I can help with Problem #2, the Cancel button. Just set the CausesValidation property of the button to false.