Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to keep grid records in order as key field is change
Message
 
 
À
23/01/2005 22:12:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00979904
Message ID:
00979917
Vues:
22
Hi, Alex.

>>>A grid shows rows of an ordered table. As new records are added they show at the top of the grid, as they should. When the key field is changed I'd like the current record to show in the appropriate relative position in the grid at about the middle visible row of the grid. How do you accomplish that?
>>
>>grid.Refresh() ?
>
>Hi Martin,
>
>It doesn't do it, at least not if I place it in the valid of the textbox in the grid. It isn't essential, so don't worry.

Oh, I see. It can get a bit tricky when you're editing over the gird itself.

Try the following:
1. Save the record pointer
2. Skip to the next record
3. Refresh
4. Return to the record
5. Refresh again

You may even try without refreshing in step 3, as it can produce a small flicker effect, but it can be needed.

Hope this helps.

Un abrazo,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform