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
Miscellaneous
Thread ID:
00029157
Message ID:
00029231
Views:
29
>>RECCOUNT() moves table pointer. So you must save RECNO() before RECCOUNT() and use it later on to GO back, restoring ActiveRow.
>
>Thanks Edward. I changed the code to the following, and it moves to the next row as desired, however, I still have two problems:
>
>1. The cursor moves to the next row, but NOT to the first column. It moves to the first visible column, but not the first column in the grid (when tabbing to the last column, the grid scrolls so the first four columns aren't visible. Shouldn't ActivateCell(1,1) move to the first column regardless?
>
>2. The code moves the pointer to the next row, but the row indicator (or whaterver the right pointing triangle at the left of the grid is called) appears twice! Also, the previous cell remains highlighted!
>
>NODEFAULT
>lCurrentRecord=RECNO("cashlist_hli_param_view")
>lTotalRecords=RECCOUNT("cashlist_hli_param_view")
>IF lCurrentRecord = lTotalRecords
> Thisform.grdCashList.ActivateCell(1,1)
>ELSE
> Thisform.grdCashList.ActivateCell(lCurrentRecord+1,1)
>ENDIF

It's a good idea to add Thisform.grdCashList.refresh
If it will not help you can try some fancy solutions, but I believe most of your problems will be resolved.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform