Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids: ActivateCell and ActiveRow
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grids: ActivateCell and ActiveRow
Miscellaneous
Thread ID:
00029157
Message ID:
00029157
Views:
66
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
Map
View

Click here to load this message in the networking platform