Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preserving a grid's settings when changing underlying cu
Message
De
16/07/1998 15:46:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/07/1998 15:45:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00117799
Message ID:
00118288
Vues:
24
>
>THISFORM.Grid1.RecordSource=THISFORM.Grid1.RecordSource
>
>PROBLEM:
>If you do this, the grid's columns, methods, and other settings disappear and need to be re-set. How can we avoid having to do this?

I've ended using a workaround: I keep a copy of the cursor's structure in an (initially empty) cursor. Then I populate it from the selection. Before any selection I blank all the records in this cursor, and when populating it I fill the blank records first, if any, and then insert the rest. This works OK if the structure of the cursor matches the selection (so I can use Scatter to [array]); if it may vary, I'd have to use Scatter Name or Scatter Memvar, which is somewhat slower. And yes, I filter out the blank records.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform