Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids / Record pointers
Message
From
22/10/1998 17:28:11
 
 
To
22/10/1998 16:38:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00149567
Message ID:
00149590
Views:
15
Hi Darren ---

Try using a paramterized view for the child grid, i.e.:

CREATE VIEW childview AS ;
SELECT * from childtable where childtable.parentkey=?parenttable.parentkey

Use this view as the recordsource. In the AfterRowColChange method of the parent grid, do a REQUERY on the child (and in Form Init to get the values aligned).

You can now jump around with wild abandon :-)



>VFP 5.0a
>
>Small problem that is only apparent when using grids. 2 cases both involving a parent grid and a child grid.
>
>First case. The parent grid has a calculated field based on a form method. The form method does not change any record pointers in either the parent or child table. In fact it does not change any record pointers in any table in the data environment the grids are tied too. Clicking in the child grid the record pointer always moves to the first record in the child grid. It is impossible to move to any other records in the child grid because the record pointer always jumps straight back to the first record in the child grid. (remove the calculated field and it works fine)
>
>Second case. (Different situation) The parent and child grids have no calculated fields. If the record pointer is moved programatically in the child grid then the record pointer will always jump back to the first matching record in the child grid. If the record pointer is moved by keyboard or mouse then all is well. If the parent grid is removed (and text boxes substitued so able to view one record at a time) and the record pointer is moved programtically in the child then all is fine.
>
>Anyone got any ideas on these horrid grid things. I'd be very appreciative.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform