|
-
Jul 13th, 2006, 07:05 PM
#1
Thread Starter
Addicted Member
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.
-
Jul 13th, 2006, 08:06 PM
#2
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.
-
Jul 13th, 2006, 08:07 PM
#3
Thread Starter
Addicted Member
Re: How to force controls to validate?
Thanks...
I just figured out that a form.Focus() also works.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|