Gustavo

Gustavo

  • NA
  • 1.3k
  • 454.4k

How can I: Create a dynamic ErrorProvider?

May 6 2010 12:07 AM


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)