Best way to clear errorproviders?

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

--
 
G

Guest

have you tried errorprovider.clear? It should clear all errors set with that
provider.
 
T

Tom

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.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top