How to force controls to validate?
Is there a method I can call that will force all my textbox controls to fire their Validating event? -or- do I have to call all those events manually? The textboxes are not bound to a datasource. If I have to call them manually, what's the best way to do that in C#?
I'm actually doing .NET Compact Framework if it matters.
Re: How to force controls to validate?
There's no such thing as calling events manually. An event is an event and it is raised by the object itself. Controls will generally be validated when an attempt to remove focus from them is made. You can call a Form's Validate method to validate every control it contains at any time. You can also call the ValidateChildren method of the form or any container or user control.
Re: How to force controls to validate?
Thanks...
I just figured out that a form.Focus() also works.