Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving visual position of current record after updat
Message
From
09/05/2006 19:58:35
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
09/05/2006 10:38:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01120344
Message ID:
01120575
Views:
21
I am not sure if this is what you are looking for but...
lnPK = table.pk
*refresh grid here 
locate for table.pk = lnPK 
if eof()
  go top 
endif 
grid.refresh()
>Is there a best practice technique for preserving the visual POSITION of the current record in a grid after the grid's record source has been updated with a a fresh set of records.
>
>For example, if the current record in a grid is displayed in visual row 4 of 10 rows and I update the grid's record source, how do I make sure that the current record remains in visual row 4 after the refresh. (This assumes that the current record remains in the record set and that each record has a primary key to seek on)
>
>I'm thinking that I need to use some combination of ActiveRow, RelativeRow and possibly the DoScroll() to fine the visual position.
>
>Any thoughts on doing this in a generic manner?
>
>Thanks,
>Malcolm
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform