Hi all,
Searching the forum I found this topic:
My problem seems to be the same, except I already use the workaround Mike proposed there (and it doesn't work):
When I reach the last visible row and hit the down arrow button, the grid scrolls one row down (eg. the next row becomes visible) but I cannot activate the next cell. No errors, no nothing. It just won't work. Resizing the grid does solve the problem, but resizing the grid is not an option.
Maybe it has something to do with the way I'm using the textbox's KeyPress event:
Searching the forum I found this topic:
My problem seems to be the same, except I already use the workaround Mike proposed there (and it doesn't work):
Code:
Thisform.gridResult.ActivateCell(nIndex,nColumn)
Thisform.gridResult.SetFocus()
When I reach the last visible row and hit the down arrow button, the grid scrolls one row down (eg. the next row becomes visible) but I cannot activate the next cell. No errors, no nothing. It just won't work. Resizing the grid does solve the problem, but resizing the grid is not an option.
Maybe it has something to do with the way I'm using the textbox's KeyPress event:
Code:
********** DOWN **********
IF nKeyCode = 24 THEN
*** Get current position in grid
Thisform.get_grid_pos()
*** Check if an update is needed
IF nPreviousValue <> This.Value THEN
Thisform.update_value("order",This.Value)
ENDIF
*** When user presses down arrow key, move to next record in grid
*** If this is the last record, move to the first in grid
IF (pnIndex + 1) <= RECCOUNT("result") THEN
pnIndex = pnIndex + 1
ELSE
pnIndex = 1
ENDIF
*** Update grid control
Thisform.gridResult.ActivateCell(pnIndex,pnColumn)
Thisform.gridResult.SetFocus()
*** No default behaviour of down arrow key wanted
NODEFAULT
ENDIF