I have a button on my form that repositions the grid to the top and selects the first (visible) cell in the first row.
The grid is repositioned and the first cell is highlighted in blue; however, the user must select the cell by clicking the mouse or pressing the tab key in order to type in any text. I would like the user to be able to just start typing. I must be missing something and there is an additional property I need to set. Following is my code.
Thanks in advance for your help.
The grid is repositioned and the first cell is highlighted in blue; however, the user must select the cell by clicking the mouse or pressing the tab key in order to type in any text. I would like the user to be able to just start typing. I must be missing something and there is an additional property I need to set. Following is my code.
Code:
' set position to top of grid
dataGridSpecs.FirstDisplayedScrollingRowIndex = 0
' highlight first row and first visible column
dataGridSpecs.ClearSelection()
dataGridSpecs.CurrentCell = dataGridSpecs.Rows(0).Cells(1)
dataGridSpecs.CurrentCell.Selected = True
Thanks in advance for your help.