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
2325
stopping validating event when pressing cancel button doesnt work
posted

I have a winform that has an ultratextbox and 2 ultrabuttons.  The cancel button has its causesvalidation property set to false in the form_load event.  The textbox has code in the validating event to check/validate the contents of the text box.  When the form loads I press the cancel button, the validating event fires.  It was my understanding that by setting the CausesValidation property to false this would prevent any controls validating even from firing.  How can I keep the textbox from validating when I press the cancel button?

  • 12480
    Verified Answer
    Offline posted

    Hello,

    Setting the CausesValidation property to false should have the effect you are expecting. I have created a small sample in which I attempted to reproduce this. It is attached here. Please take a look at the sample and see if you are able to modify it to reproduce the issue.

    CausesValidation.zip