Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET VIEW TO filename is blanking out my grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00128144
Message ID:
00128280
Vues:
25
Brenda,

You are doing alot of unnecessary work here. Here's some code that will take care of your grid (I still say you need to get rid of the view files).
* Grid save and restore
WITH THISFORM.Grid1
   LOCAL laCols(.ColumnCount), lnCnt, lcRecordSource
   FOR lnCnt = 1 TO .ColumnCount
      laCols(lnCnt) = .Columns(lnCnt).ContolSource
   ENDFOR
   lcRecordSource = .RecordSource
   .RecordSource = ""

   * Do your thing here

   .RecordSource = lcRecordSource
   FOR lnCnt = 1 TO .ColunmCount
      .Columns(lnCnt).ControlSource = laCols(lnCnt)
   ENDFOR
ENDWITH
You can greatly simplify everything for yourself by using views (that is real views in a database), private data sessions, and the other features of Visual Foxpro instead of using the features left over from FoxBASE +. You would spend less time learning those features than it will take to get this working the way you are doing now.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform