Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preserving visual position of current record after updat
Message
De
10/05/2006 10:42:25
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
09/05/2006 23:36:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01120344
Message ID:
01120693
Vues:
18
Hi Malcolm,

I have never had the issue you describe. When I restore the row the grid seems to remember which row it was displaying. I am not replacing the cursor the grid is bound to. I am not sure what would happen if the cursor was replaced.

>Hi James,
>
>Your code successfully restores my previously selected record in a grid. This is the 1st part of a two part question :)
>
>The 2nd part of the question is how to position the selected record at the same relative row within the visible portion of the grid.
>
>VFP's native behavior is to position the re-selected record in the MIDDLE row of the visible grid. I want to position the re-selected record at its ORIGINAL position within the grid. (For sake of simplicity, you can assume that there will always be enough records in the record source ahead of the currently selected record to support this type of positioning)
>
>For example, if I have a grid that displays 10 rows in its visible area and my currently selected record is the 2nd visible row in the grid, when I restore my selected record, I want it to be restored to the 2nd visible row in the grid - NOT the middle of the grid as VFP does by default.
>
>Thanks for taking a stab at this question,
>
>Malcolm
>
>
>>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()
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform