M
Malachy O'Connor
Hi,
I'm having weird problems with Valadating Events.
I have a number of countrols that handle their own Valadating events
in to perform data validation.
I also have a Custom control that contains Add, Edit, Delete, Save and
Cancel buttons.
The Causes validation property for this control is defaulted to true.
I pickup the mouse enter and leave events on the cancel button in
order to set the custom control CausesValidation property to true or
false depending on whether or not the mouse is over the cancel button.
Works a treat. However
If I press cancel and then close the form the validation method
of the control whoes validation event I had just avoided fires.
Even though the cancel button has focus.
This is the only time that the validation method fires when close
form button is presses (unless the control being validated had
focus).
Any suggestions would be greatly apriciated,
I'm pulling my hair out here.
Cheers,
Malachy
I'm having weird problems with Valadating Events.
I have a number of countrols that handle their own Valadating events
in to perform data validation.
I also have a Custom control that contains Add, Edit, Delete, Save and
Cancel buttons.
The Causes validation property for this control is defaulted to true.
I pickup the mouse enter and leave events on the cancel button in
order to set the custom control CausesValidation property to true or
false depending on whether or not the mouse is over the cancel button.
Works a treat. However
If I press cancel and then close the form the validation method
of the control whoes validation event I had just avoided fires.
Even though the cancel button has focus.
This is the only time that the validation method fires when close
form button is presses (unless the control being validated had
focus).
Any suggestions would be greatly apriciated,
I'm pulling my hair out here.
Cheers,
Malachy