Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorry for being a numbskull - a grid question
Message
From
11/12/1997 14:24:24
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00065305
Message ID:
00065360
Views:
35
>>>>>Hi folks, I am using VFP 3.0b for Windows.
>>>>>
>>>>>I have a really fundamental question about creating a 1 - many form that uses tables directly (no arrays, no views, no cursors).
>>>>>
>>>>>There seems to be two "true" VFP ways to create the form and set the relation between the two tables.
>>>>>
>>>>>1) Use the grid builder, this then sets the relation between the two tables. It seems in this case the tables don't have to be in the data environment.
>>>>>
>>>>>2) Put the tables into the data environment. Use drag and drop to relate the tables (if a persistent one doesn't already exist). Drag and drop the child table onto the form. The grid builder can then be run to set up the columns (not necessary), but the relation is not set between the two tables since the relation is set in the data environment.
>>>>>
>>>>>I have a few questions about these two methods, so I hope someone has time to answer them.
>>>>>
>>>>>A) Am I correct that these are two different methods, or am I confused?
>>>>>
>>>>>B) Which is the best method?
>>>>>
>>>>>C) I am using method 2, but I can't get the order of the child table in the grid. RFID is the primary key in the parent table and RFID is the foreign key in the child table. How do I set the child order. The child has a compound key that is a combination of RFID (foreign key) and date. This is the order that I would like the child table to be in. I can't get the form to child records to display in the grid properly by using the compound key or by setting the childorder property (in the dataenvironment) to what I want.
>>>>>
>>>>>So... if anyone can lend a hand to a rambling numbskull, I would appreciate it.
>>>>
>>>>Yes these are two different methods and there is the third one which incidenatally I like the best. One of its advantages that you can support/change any order in child grid regardless table pointers, primary/foreign keys etc.
>>>
>>>Ed,
>>>
>>>This is the second time you have done this to me. IE Told me there was an answer but not answered the question. :-)
>>>
>>>Could you tell me how to solve my problem (item C) and explain your third options?
>>
>>I didn't want to misguide you if you really want to proceed first two ways, as many people do. The third way is cursor in form of simple cursor if you are not going to edit inside the grid, or parameterized view if you want to edit. Both ways allow you to sort grid rows because cursor can be indexed by multiple tags.
>
>I have used both cursors and parameterized views. Both have drawbacks and IMHO they shouldn't be necessary in VFP. Cursors can't be edited, and a parameterized view is redundant since one can define relationships between tables.
>
>Do you know how I can use method 2 (tables in dataenironment) to not only link the two tables, but to order the child table?

Sorry, Evan. It's really difficult for me to give advices in areas which I persoanlly don't like to use. Good sense tells me that it cannot be done directly.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform