focus on otherform.textbox from datagrid

  • Thread starter Thread starter Tim De Vogel
  • Start date Start date
T

Tim De Vogel

Hi,

When a user uses an asteriks as input in one of my datagrid fields, I open
another form in which users can select a product from a list. Everything
works perfectly, except that I can't get the focus to the textbox on the new
form.
I tried _popupForm.txtSearch.Focus() but it doesnt work unless I disable the
datagrid from where I call the form (and I can't do that because of various
reasons). I can click on the textbox and it gets focus without a problem.
I suspect the reason why it doesn't work is because the datagrid is in
"edit" mode.

Any suggestions? It's kind of hard to search on this because of the terms
involved (datagrid, focus etc)
 
Hi Tim

If you're opening up another (presumably new) form can't you set the
focus from within that form (as opposed to the calling form)? i.e. in
the onLoad method etc?

Martin
 
Back
Top