how do i make my datagrid get the focus when I first load the form

Hi,

I have an MDI that shows a child form. the child form has a datagrid. I want to be able to navigate throught the rows of the datagrid right way, withiut having to use the mouse to first select the datagrid.

I know how to select my first row in code. but i don t know how to select the datagid itself in code. i always have to go with mouse and select my datagrid.

can u help pls,




Answer this question

how do i make my datagrid get the focus when I first load the form

  • Murali Krishna K

    I was placing myDataGrid.focus in the load event. I just put it in activated event and that worked well.

    Thanks.



  • how do i make my datagrid get the focus when I first load the form