General information
Category:
Forms & Form designer
Title:
Grids: ActivateCell and ActiveRow
I'm trying to use the following code in the LostFocus event of the textbox in the last column in my grid. The purpose of the code is so when a user tabs out of the last cell, the cursor will automatically move to the first cell of the next row, or the first cell of the first row. However, it is not working. The value of lCurrentRow seems to always be 0!
NODEFAULT
lTotalRecords=RECCOUNT("cashlist_hli_param_view")
lCurrentRow = Thisform.grdCashList.ActiveRow
IF lCurrentRow = lTotalRecords
Thisform.grdCashList.ActivateCell(1,1)
ELSE
Thisform.grdCashList.ActivateCell(lCurrentRow+1,1)
ENDIF
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only