Windows Application validation
am 15.10.2007 13:40:50 von SQLGuy
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.
Re: Windows Application validation
am 15.10.2007 16:01:07 von Jan Hyde
Krish 's wild thoughts were released on
Mon, 15 Oct 2007 04:40:50 -0700 bearing the following fruit:
>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
>Also, the validation should happen even if the user clicks on a
>toolbar button after entering the data in a text box.
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
Re: Windows Application validation
am 15.10.2007 19:17:55 von RAD
On Mon, 15 Oct 2007 15:01:07 +0100, "Jan Hyde (VB MVP)"
wrote:
>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.
--
http://bytes.thinkersroom.com