M
Marina
Hi,
Let's say there a bunch of textboxes on the screen, and there is a toolbar
on the form (Infragistics). When a button is clicked, whatever field the
user was last on needs to be validated, and then some work done based on
what the button was that got clicked.
The problem is, the validation event doesn't fire on the textbox when this
happens. In fact, clicking outside the textbox doesn't validate the textbox,
or change the fact that it still has focus.
Now, the form can also have grids, dropdowns, etc. And basically, no matter
what control last had focus, it needs to 'lose focus', so that its contents
can be validated before anything else happens.
How can I force a control to lose focus without explicitly having to give
focus to some other control? I just want the current control to lose focus,
and give focus to the form as a whole.
But basically, how do I force validation in the current control when a
button elsewhere is clicked? Right now, the last control retains focus.
Thanks
Let's say there a bunch of textboxes on the screen, and there is a toolbar
on the form (Infragistics). When a button is clicked, whatever field the
user was last on needs to be validated, and then some work done based on
what the button was that got clicked.
The problem is, the validation event doesn't fire on the textbox when this
happens. In fact, clicking outside the textbox doesn't validate the textbox,
or change the fact that it still has focus.
Now, the form can also have grids, dropdowns, etc. And basically, no matter
what control last had focus, it needs to 'lose focus', so that its contents
can be validated before anything else happens.
How can I force a control to lose focus without explicitly having to give
focus to some other control? I just want the current control to lose focus,
and give focus to the form as a whole.
But basically, how do I force validation in the current control when a
button elsewhere is clicked? Right now, the last control retains focus.
Thanks