Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't assign the controlsource of a grid column anymore
Message
De
03/09/1998 16:14:32
 
 
À
03/09/1998 16:04:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00132988
Message ID:
00132996
Vues:
12
>Code in the Activate() event of my page frame:
>
>WITH THISFORM.pgfValid.pagListe.grdListe
>   .RecordSource = "TempListe"
>   .colListe.ControlSource = "TempListe.cLiNom"
>   .colDate.ControlSource = "TempListe.dAppel"
>   .colTel.ControlSource = "TempListe.cTel"
>   .colPrenom.ControlSource = "TempListe.cCustomerName"
>   .colRespCode.ControlSource = "TempListe.cCodeRep"
>   .colAgentNb.ControlSource = "TempListe.cNoAgent"
>ENDWITH
>
>This was working fine until I deleted 2 columns from my grid (not appearing in the code above).
>
>Now, whenever the Activate() event fire, I get the message "Unknown member COLLISTE". I get this error message for each of the 6 columns of the grid.
>
>In the debugger, I can see that the name I gave for the columns have been replaced by Column1, Column2, etc. They still appear with the correct name when I open the form (colListe, colDate, etc.)
>
>I even recreated the grid from scratch, but to no avail.
>
>TIA

I guess that TempListe is a cursor and there is some precaution you may take in this situation: any time you rebuild the cursor running SELECT, disconnect grid from cursor before SELECT by setting RecordSource="". For some reason grids don't like to be bothered too much from Activate events.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform