Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cgridlist and SET RELATION TO
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00360462
Message ID:
00360605
Views:
12
>>One workaround I've found in these situations: I do NOT set relation programitcally, but instead set the childorder, linkmaster, and RelationalExpr in each child grid... Yeah I know that it is theoretically the same thing, but give it a try.
>
>< whimpering > oh yuck, I never mess with that stuff before.
>
>Can you get me out of the woods Gar... Is this native VFP grid stuff or framework specific stuff?
>
>Thank you!

Native VFP:
childorder is the index you set the child grid to for the relationship.
Linkmaster is the parent table (not grid. The parent in a linkmaster need not even show in the form)
relationalExpr - the expression in the parent table which the child grid is related to.

So imagine you have an invoice master detail form. Imagine the table structure is as follows
Invoice_master
=============
inv_key
cust_no


Invoice_det
===========
inv_det_key
inv_key
prod_key
amount_per_item
item_qyt
Then your child grid would be the grid based upon Invoice_det.
Your child_order would be
inv_key
. Because after all, you want to see the detail only for the current invoice.

The linkmaster in
invoice_master
because that is the name of the table invoice_det is a child of

The relationalExpr is
inv_key
because you want the child grid to refresh every time
inv_key
in the master table changes.

Hope this is clear. You can check the help in each of these properties in grid. Again the key is that all these properies are being set for the child table only. Nothing you set in the parent grid affects the linkmaster.
Thanks

Gar W. Lipow
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform