Best way to clear errorproviders?

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Just wondering what others were doing to clear the errorprovider? What
I mean is that, during processing of a windows form, I may turn on
(i.e. SetError) the errorprovider for various fields. Now, once I have
committed the data (or reset the form), I want to be able to 'clear'
all these flags before the user re-uses the form. Normally, I just run
a method (which I usually call ResetErrorProvider) that sets each
field's errorprovider to string.empty for each field I may have set the
errorprovider on.

Is there a 'better' or 'easier' way to do this? It's too bad that there
isn't an ErrorProvider.Clear method that simply clears every field's
error provider... or is there something like this somewhere?

Just curious... Thanks in advance.

Tom

--
 
have you tried errorprovider.clear? It should clear all errors set with that
provider.
 
ewok66 said:
have you tried errorprovider.clear? It should clear all errors set
with that provider.

Ewok: Unfortunately, this must be a VS 2005 feature. I am using VS 2003
and there doesn't seem to be an ErrorProvider.Clear.

--
 
Back
Top