Question

In a Windows form I've some controls and a UserControl. I've a ErrorProvider in the UserControl. I want to stop editing all the controls in the Form if there is an error in the userControl. Is there any way to do that?

I am using errorProvider.BindToCustomDataAndErrors(..)

Était-ce utile?

La solution

There is no any built-in way in Windows Forms that I'm aware of, to do something like that. I do believe you should implement it by yourself.

You can create an event like ErrorRecieved (say), and Disable controls in its handler.

EDIT

Here also a link to similar SO question.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top