Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keeping track of grid position - recno()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01292690
Message ID:
01292702
Views:
20
>I have a gird, with a column with a check box... User selects records to process via checkbox. Then user presses a button to process the records selected.
>
>Once completed I would like to return to wher user left off.
>
>This is what I'm presently doing and the result.
>
>Prior to processing, which is done via a tableupdate, i move the record pointer 1. I get the primary key for this record.
>2. I do the update.
>3. I locate the primary record. (via a seek(lnPrimaryKey,table,pkindex)
>4. then I set focus to the grid.
>
>The problem is the grid gets focus at the top of the grid, not where user left off.
>
>(If I look in debugger, prior to the setfocus call of the grid, the record pointer is on the record. Once the grid.setfocus is called, the record pointer points to the first record and that's where the grid is.)
>
>Mike


Might try this - pretty much the same as what you're doing already but with a grid.refresh()
update -- as Namoi said - be sure that you're actually getting the correct value in step 1.

1. get primary key for record
2. do the update
3. SELECT the table/view that is the data source for the grid
4. Do the seek
5. run the .refresh() method of the grid
6. do a setfocus() on the grid
7. (if necessary) run the .refresh() method of the form.
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform