Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disappearing grid on refresh
Message
De
11/08/1998 11:30:14
 
 
À
11/08/1998 11:24:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00125621
Message ID:
00125626
Vues:
13
>I am creating a cursor in the load event of my form. The cursor is the record source for my grid & the record source type is set to 1. My form displays correctly for the first record, but when the cursor is rebuilt the grid box disappears & displays as a white rectangle. My cursor is rebuilding with the correct records & I am refreshing the grid. Why does the grid disappear & not refresh?
>
>TIA for any suggestions. :)

When you overwrite cursor (e.g. by running new SELECT-SQL) vfp thinks that you created completely new recordsource and kill old one and clean-up the grid. To avoid you can use two ways: either
1. Don't override cursor. You can instead SELECT INTO another cursor/array and APPEND/INSERT to existing cursor from new one.
or
2. Restore grid setting programmatically after each cursor overriding:
Select ... Into cursor tmp
Grid.RecordSource="tmp"
Grid.Refresh
This way you will be also committed to resetting specific Column properties (ControlSource, Width, etc.)
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform