Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable validation of errorprovider when click cancel button

is there a way to disable the validation of errorprovider elegantly when click cancel button to dismiss a winform? The validation always happens when the textbox lose focus, and i don't wanna it to validate when the user click cancel button, it is just a little bit silly to validate when the user clicking cancel.

like image 574
Benny Avatar asked Jan 03 '10 15:01

Benny


1 Answers

after googling, found the answer, just set CauseValidation property of the cancel button to false. that's it.

like image 151
Benny Avatar answered Nov 10 '22 10:11

Benny