This method lets you change which cell has the focus in a grid.
grdGrid.ActivateCell( nGridRow, nGridColumn )As the parameters indicate, this method operates the rows and columns of the grid control, not records. You can't use it to simply choose any record or field to gain focus. Parameters of (1,1) refer to the cell displayed in the upper left corner of the grid; parameters of (3, 2) send it to the third row down, second column that's displayed.
To set focus to a particular record, consider instead setting the record pointer to it with GO, LOCATE or SEEK. To move to a particular column, you can also use its SetFocus method. (You can do so even if the grid was created with ColumnCount = –1. The columns exist anyway as Column1, Column2, etc.)
* This fails to find the first visible field of the
* first record in the display:
Thisform.grdMyGrid.ActivateCell(1,1)
* To activate the very first column of the first record in
* the table, try this:
LOCATE && the better GO TOP
Thisform.grdMyGrid.Column1.SetFocus()