Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids
Message
From
03/10/1999 21:09:11
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Re: Grids
Miscellaneous
Thread ID:
00272082
Message ID:
00272171
Views:
25
>It is possible for me to display the fields from two different tables using one grid? If yes, how can I do that? Thanks a lot...
>
>Susan

Though it's possible to combine fields from two or more related tables by using them as column.controlsource, the result is unstable. The better way is to bring up other tables (not recordsource) fields using customized column controlsource: e.g.
*** Grid.Init event
This.Recordsource="mytable1"
This.Column1.controlsource="mytable1.myfieldX" && 'normal' column
This.ColumnX.controlsource="''+thisform.getotherfield(mytable1.id)"
Here, 'getotherfield' is form custom method that will apply some algorithm (e.g. SEEK in another table) to retrieve field values from other tables. Simplistically, it can be LOOKUP() function.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform