Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A Column Grid with 2 possible controlsource
Message
From
21/10/1998 13:41:00
 
 
To
21/10/1998 13:31:37
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00148996
Message ID:
00149005
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform