Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re-position grid after refresh
Message
From
30/06/2006 08:05:39
 
 
To
28/06/2006 02:21:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01132279
Message ID:
01133030
Views:
22
>Hi All. I have a grid displaying some data from a cursor. I scroll it down a way. Then I change the data in the cursor, which has a fixed number of records, and refresh the grid which puts the grid back to the top and the first record. What was the technique / trick to allow the grid to re-display at the same place in the cursor i.e. to the same scrolled level as before the refresh?

Not tryed this:
**** Before you refresh the grig:
LOCAL lnRelRow, lnScrollDirection
lnRelRow = thisform.Grid1.RelativeRow
thisform.Grid1.Refresh()
IF m.lnRelRow # thisform.Grid1.RelativeRow
   lnScrollDirection = IIF(m.lnRelRow < thisform.Grid1.RelativeRow, 0, 1)
   DO WHILE m.lnRelRow # thisform.Grid1.RelativeRow
      thisform.Grid1.DoScroll(m.lnScrollDirection)
   ENDDO
ENDIF
but again this is not tested.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform