focus on otherform.textbox from datagrid

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)
 
P

Pritcham

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
 

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

Top