|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Best way to clear errorproviders?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. -- Show quoteHide quote--ewok MCSA+M,MCSE, MCSD, MCDBA,MCITP "Tom" wrote: > 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 > > -- > > ewok66 wrote:
> have you tried errorprovider.clear? It should clear all errors set Ewok: Unfortunately, this must be a VS 2005 feature. I am using VS 2003> with that provider. and there doesn't seem to be an ErrorProvider.Clear. -- |
|||||||||||||||||||||||