不知有无帮助:
表单自定义方法:_SetCell(nRow, nCol, nRecno)
功能:设定GRID的第nRow行显示第nRecno条记录,nCol决定nRow行的活动单元格。
FUNCTION _SetCell(nRow, nCol, nRecno)
IF nRow <= nRecno
GO nRecno
this.grid1.SetFocus
this.grid1.ActivateCell(nRow, nCol)
DO WHILE RECNO() != nRecno
this.grid1.DoScroll(IIF(RECNO() < nRecno, 1, 0))
this.grid1.SetFocus
this.grid1.ActivateCell(nRow, nCol)
ENDDO
ENDIF
ENDFUNC