Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Refresh Prob
Message
 
À
17/02/1999 16:33:23
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00188597
Message ID:
00188757
Vues:
26
>>>I have a grid with child data that will not refresh (after a THISFORM.REFRESH) when I have changed value of the KEY in the parent and then moved the pointer in the parent:
>>>
>>>The following is part of my screen INIT:
>>> SELECT dm_lines
>>> SET filter to dm_lines.line_id = dm_request_lines.line_id
>>> GO top
>>> SELECT dm_operator_partners
>>> set order to 1
>>> SET key to dm_lines.line_id
>>> GO top
>>>
>>>When I SKIP +1 or SKIP-1 in the parent the relevant code is:
>>> SELECT dm_lines
>>> SET filter to dm_lines.line_id = dm_request_lines.line_id
>>> GO top
>>> SELECT dm_operator_partners
>>> SET key to dm_lines.line_id
>>> GO top
>>> thisform.refresh
>>>
>>>My grid properly displays all of the child info (dm_operator_partners) until I change a the value of dm_lines.line_id and issue the same:
>>> SELECT dm_operator_partners
>>> SET key to dm_lines.line_id
>>> GO top
>>> thisform.refresh
>>>From this point on, if I skip +1 (with the code shown above) all the data grid disappears. The only time I can see the data in the grid is when I move the parent (dm_lines) back to the entry that I changed.
>>>
>>>It's like the grid's relation to the parent is stuck to the one entry in the parent that I changed (dm_lines.line_id) even though the pointer in the parent (dm_lines) has changed to another record with a different KEY value (dm_lines.line_id).
>>>
>>>What is realy perplexing is that if I SUSPEND and then browse all the correct data is shown in the BROWSE window. The grid simply will not display it (unless I am on the record that I changed in the parent).
>
>
>>>
>>>Any Ideas???
>>
>>You don't indicate whether you are making use of the .ChildOrder, .LinkMaster and .RelationalExpr properties of the grid. Are you? You migh want to take a look at these.
>>
>>Steve
>
>I have tried but that causes more probs. I have read much of the documentation on these properties but am still not clear on how to use them.

.ChildOrder is just what it says.........the order that will be used to link the two together and governs what records in the child grid get displayed based on the value in the... .LinkMaster, the parent table/view. RelationalExpr is a text representation of the field(s) used to define the link. This is typically the field name of the .ChildOrder. These usually need to be in place before the tables open. The ChildOrder will take precedence over anything you set in code or in the dataenvironment of the form.


Steve
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform