Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to show fields from related tables in grid
Message
From
27/01/2003 03:43:21
 
 
To
26/01/2003 23:59:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00745622
Message ID:
00745648
Views:
16
>In a navigation grid I want to show fields from related tables. Can this be done without using a select cmd as record source?
>
>TIA,
>
>Alex

Alejandro,


You can add columns to your navigation grid an set their controlsource to eg RelatedTable.Name

You'll have to open the RelatedTable and set its order to a related key

In addition, you'll have to define a relation (see SET relation command)

sample:

form.load()
use RelatedTable again in 0 order Id
set relation to TableOfGrid.SomeField into RelatedTable in TableOfGrid

grid.init()

local cc

cc= this.ColumnCount + 1
this.ColumnCount = cc
with this.Columns[cc]
.ReadOnly = TRUE
.ControlSource = 'RelatedTable.Name'
.Header1.Caption = 'Name'
endwith
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform