Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying an updated grid--scroll issues
Message
De
11/03/2009 15:08:57
 
 
À
11/03/2009 13:40:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Application:
Desktop
Divers
Thread ID:
01387174
Message ID:
01387228
Vues:
110
Tamar,

If I have understood it - it sounds similar to the following

- you are in a grid, say at recordnumber n of the RecordSource, and in a textbox
- from within the textbox, you launch a search form - modal
- when you leave the seachform, you are still at recordnumber n of the RecordSource, but relative row has changed, ie the line you were on is now perhaps the top row of the grid

How did I solve this ?

(1) Store the RelativeRow
(2) launch the search form
(3) then on return, restore the relative row by
(a) Either scrolling a page up or down Once(depending on the old relative row and the one now)
(b) do while old_relativeRow != relativeRow
scroll a line up/down (depending on the old relative row and the one now)
enddo

Using the grid's DoScroll() method
Restoring the relative row is nicely wrapped within a LockScreen/unlock screen


>I have a form where I'm adding a pair of grids (each on a separate page) dynamically. The underlying data gets updated based on a timer, and when it does, I need to repaint the grids. I've got all that working, but ... although I restore the record pointer to its original position, the customer is unhappy about the grid scrolling on the refresh. Is there a way to restore it to the same visual position?
>
>I've been assuming that what I need to do is:
>
>a) store info about which row was the top row displayed and then
>b) do something to make that one the top displayed row again.
>
>But I'm not having any success at part a. I tried adding a property to track the top displayed and updating it (tried RelativeRow_Assign, but it doesn't even fire, so put code in AfterRowColChange and Scrolled), but of course, when the user scrolls so that the ActiveRow is no longer visible, that code fails.
>
>Anybody know how to do this?
>
>Tamar
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform