Hi,
I'm very new to windows forms and C# so this is my first post in this
group :-) I have a very simple forms app with a tab control containing
two tabs. Its related to football and one tab relates to players and
the other tab to teams. I'm using the ErrorProvider component to
display error information which I set in the Validating handlers for
the controls that need validating.
I set the form to AutoValidate.EnableAllowFocusChange and then in my
button that I want the validation performed in (I have a save button
in each tab) I was hoping I could use the ValidateChildren method to
invoke all of those handlers. The problem is that ValidateChildren
would seem to only apply to the form as a whole and I want to treat
the controls on each tab separately. Of course what is happening is
that if the user enters some data in the player tab for example and
tries to save it, the validation events for the teams tab also kick in
and if those controls are empty then the form as a whole is invalid.
The tab control doesn't seem to have a ValidateChildren function and I
can't seem to find any way of grouping them. According to the docs I
should be able to call the method on any class that is a
ContainerControl but I dont know of any classes that are derived from
that one!
Any help much appreciated,
Caroline M.