Domanda

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(..)

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top