Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid details change
Message
 
 
À
15/02/2016 15:35:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01631506
Message ID:
01631509
Vues:
77
>Attached are two pics. They are of a grid - the one shows how the grid looks the first time the search is used. The other shows what it looks like any subsequent time. I set up the header captions, column/text colors etc in the property editor, at all looks fine the first time around. All subsequent times - no go. And the first time around, I can click on the data in the columns, and the proper job gets pulled up for editing - subsequent times - no. Here is the code..
>
>
>SELECT ad1,custno,ponum,inv,orddate,invdate FROM jobs;
>WHERE custno=mcustno;
>ORDER BY ad1,custno,orddate INTO CURSOR possibles
>SELECT possibles
>thisform.grid2.RecordSource='possibles'
>thisform.grid2.RecordSourceType= 1
>ThisForm.Grid2.refresh
>
>
>It makes no difference if I set the record source/control sources in the property editor, or not. Only by writing it in as above does it populate the grid. I can programmatically paint up the grid again, but it still doesn't let me click on a row to take me to the job editor...

Use safe select instead, e.g. create your Possibles cursor only once in the form's Load and when you need to refresh do this
zap in Possibles

SELECT ad1,custno,ponum,inv,orddate,invdate FROM jobs;
WHERE custno=mcustno;
ORDER BY ad1,custno,orddate INTO CURSOR possiblesTemp


** VFP9 code, in prior versions use APPEND FROM
insert into Possibles (ad1, custNo, Inv, OrdDate, InvDate) ;
select ad1, custNo, Inv, OrdDate, InvDate from possiblesTemp

use in (select('possiblesTemp')) && close temp cursor
>
>Any ideas what I am missing?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform