Only display validation errors after trying to save?

Only display validation errors after trying to save?

Old forum URL: forums.lhotka.net/forums/t/3484.aspx


josh.kodroff posted on Wednesday, September 05, 2007

Hey all,

In my application, I have a requirement that ErrorProviders should only display the error icon after the user attempts to save the form.

For most controls on most forms, while a bit of work, this is not too bad - just refrain from setting the errorprovider's datasource until the form is saved.

However, I can't seem to remember how to get this to work with a DataGridView.

It's been a long time since I put the ErrorProvider icons on my forms.  Does the DGV need an ErrorProvider, or does it do its validation on its own?

How do I prevent the error icon from appearing in a DGV until after the user has attempted to save the form?

juddaman replied on Wednesday, September 05, 2007

Hey

DGV has ShowCellErrors and ShowRowErrors properties, is that what your after?

George

josh.kodroff replied on Thursday, September 06, 2007

Big George, gettin' it done!

That's exactly what I'm looking for!

Thanks!

Copyright (c) Marimer LLC