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:
00128348
Vues:
30
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.

i will tell my boss. maybe she will listen to you. she will not listen to me. project is a converted 2.5, very large, and way behind schedule. not a very unique situation. tried your suggestion. works well except that the grid column data is changed to the table column data (ex. grid1.column1 contains the first column of the table) when recordsource = "". also someone else suggested chaning recordsourcetype = 0. is this necessary? last question then you are off the hook. do you know how to read the grid rows into an array?

thanks for you help - brenda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform