Windows Application validation

  • Thread starter Thread starter Krish
  • Start date Start date
K

Krish

I have a user control in a form (form has a toolbar.)

In the user control I have some text boxes for which I need to do some
validations.
Which is the best event to do this? Ideally I should do the validation
on leaving the control itself and bring the focus back if the control
fails the validation.

Also, the validation should happen even if the user clicks on a
toolbar button after entering the data in a text box.
 
I have a user control in a form (form has a toolbar.)

In the user control I have some text boxes for which I need to do some
validations.
Which is the best event to do this? Ideally I should do the validation
on leaving the control itself and bring the focus back if the control
fails the validation.

Ideally, you shouldn't as the makes for a very annoying
interface. Do the validation once the user is finished, ie
when the click the submit, ok, apply button.

J
 
Ideally, you shouldn't as the makes for a very annoying
interface. Do the validation once the user is finished, ie
when the click the submit, ok, apply button.

How true! Many users don't even look at the screen as they type and
will be very frustrated that the last data they had typed went nowhere
because a popup appeared to prompt them to correct the data!

Validate the data at once. Perhaps you could have a 'dirty bit' whose
status you check before doing any other operations that will trigger
the validation logic.
 

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