I have a data grid and a textbox on the same form. When the form is opened
and the datgrid is displayed the focus goes there, not to the textbox. I
have tried to use textbox1.focus() on the textbox but it doesn't work.

How can I get the focus on the textbox, not the datagrid.

Re: DataGrid and Texbox Focus by Sijin

Sijin
Tue Nov 09 03:15:02 CST 2004

Can you post the code for Form_load event, are you setting the focus to
the textbox at the end of form load?

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

mh1mark wrote:
> I have a data grid and a textbox on the same form. When the form is opened
> and the datgrid is displayed the focus goes there, not to the textbox. I
> have tried to use textbox1.focus() on the textbox but it doesn't work.
>
> How can I get the focus on the textbox, not the datagrid.