Validation Block - Error Provider Refocusing

Topics: Validation Application Block
Jan 5, 2009 at 10:18 AM
Hi Guys,

I'm using the validation block (4.1) + ErrorProvider and have them integrated with my WinForms app properly, however, i can't find the setting that enables re-focusing on validation fail. i.e. when validation fails you can't currently move to the next control, and i'd like to move, but display the error icon.

I'd like to test all my validation on a submit click, rather than on a per control basis, but display the validation results next to the appropriate controls.

Any idea how to do this?


Jan 5, 2009 at 12:47 PM

Change the value of the AutoValidate property of you form containing your Error provider to "EnableAllowFocusChange".

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.
Jan 5, 2009 at 1:15 PM
Wow, that simple.

I really feel like a plank now. :(