Q: Validating a control on a form

  • Thread starter Thread starter Visual Systems AB \(Martin Arvidsson\)
  • Start date Start date
V

Visual Systems AB \(Martin Arvidsson\)

Hi!

I have written a simple validating event for a couple of textbox's on a
form.

They validate just fine when leaving the form, now for the problem. If i
click a button to begin execution, i want to validate all the textforms
before it can proceed.

I have tried to send validate to the form, but it just wont validate. Do i
have to issue the validate on every textbox containg the validating event?
Is it possible to automating that some how?

Regards
Martin
 
Hi,

What abou if in the onclick handler of the button you just call the
validatin method:

Later all you have to do is check if the validation was ok or not

void Button1_OnClick( ... )
{
Form1_Validate( null, null);


}

cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top