Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Column Grid with 2 possible controlsource
Message
De
21/10/1998 13:41:00
 
 
À
21/10/1998 13:31:37
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00148996
Message ID:
00149005
Vues:
29
>I have a grid based on table1 with 2 columns. Column controlsource is table1.cd_type Column2 the controlsource is table2.ds_type2 when table1.cd_type = 1 or is table3.ds_type3 when table1.cd_type = 2
>
>table1
>cd_type N(5)
>
>table2
>cd_type N(5)
>ds_type2 C(35)
>
>table3
>cd_type N(5)
>ds_type3 C(35)
>
>Thank to you all

If you're asking how to implement 'flexible' appearance of the second column, then you can use customized column controlsource:
*** Form.Init event
This.MyGrid.Column2.Controlsource="Thisform.GetColumn2(Table1.cd_type)"
*** Form.GetColumn2 custom method
LPARAMETER nType
IF nType=1
 Return table2.ds_type
ELSE
 Return table3.ds_type
ENDIF
PS: If your algorithm is really so simple then you can use simple IIF(..) as column.controlsource.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform