Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
1:M Grids on Forms (VFP3)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00063218
Message ID:
00064327
Vues:
68
Just found something interesting, all my testing has been editing existing records, the grid works fine for new records OR once an existing record is saved. I've looked at my form and save button. I pass the form the record id and do a lookup to ensure I have that record and scatter the fields to an array. When I save I update the datestamp fields, reset some buttons and scatter to the array again.

What is happening when I save that I should also be doing when I initialise?

Sarah

>Thanks for your replies. I've managed to get my grid looking really slick, love the sparse feature! However when I open my form I see my parent record and ALL THE CHILD RECORDS, not just those relevant to the parent record.
>
>I can get the relation working from the command window with the following commands:
>
>SELECT TRANSACT
>SET RELATION TO transactid INTO Transdet
>
>AND when I look at the relevant(?!) properties of the grid and form I see:
>
>Cursor 1
>Alias = "transact"
>Database = bkdata.dbc
>CursorSource = "transact"
>Name = "CURSOR1"
>
>Cursor 2
>Alias = "transdet"
>Database = bkdata.dbc
>CursorSource = "transdet"
>Name = "Cursor2"
>
>Relation1
>ParentAlias = "transact"
>RelationalExpr = "transactid"
>ChildAlias = "transdet"
>ChildOrder = "transactid"
>OneToMany = .T.
>Name = "Relation1"
>
>Grid Details
>ChildOrder = "TRANSACTID"
>LinkMaster = "TRANSACT"
>Panel = 1
>RecordSource = "TRANSDET"
>RecordSourceType = 1
>RelationalExpr = "TRANSACTID"
>Tag = ""
>Name = "grdDetails"
>
>I can't believe this is turning into such a big deal and really really appreciate your help so far. Can you see where I'm still going wrong.
>
>Thanks - Sarah
>
>>>I've read the help text and the manuals but can't get to grips with Grids - can anyone spot where I go wrong.
>>>
>>>I have a table (chattels) with key ChattelsId and a child table (ChatYear) with ChattelsId and ChatYearId.
>>>
>>>ChatYear has an index on ChattelsId and I am using this when setting up my grid. The grid seems happy to display the correct number of records but all have the same values.
>>
>>>Sarah
>>
>>Sarah, check your LinkMaster, ChildOrder and RelationalExpr values in the grid. You may have one of those set incorrectly. Also, try changing Sparse from .T. to .F. or reverse.
>>
>>HTH
>>Barbara
Sarah King
pcpropertymanager.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform