2
Answers

How can I: Create a dynamic ErrorProvider?

Gustavo

Gustavo

14y
5.6k
1


Hello:
 
I need to pass/update/set an ErrorProvider. Here is my case:
 
I have a MDIParent that calls a MDIChild. The MDIChild has Controls for the Enter and Leave Events for all TextBoxs. The Leave Event in the Control calls a Class that will do the validation. In the ClassValidation I can use the
((
TextBox)sender).Focus(); to set the focus to the invalid TextBox (It works fine).
 
Is there a way I can set the ErrorProvider in sort of the same way?
 
Something like this: ???
_______.errorProviderICEPack.SetError(((TextBox)sender), TheError);
 
Where the _______ is the name of the Form that the control was called from.
Answers (2)