Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position of Child Form Record
Message
From
25/10/2005 02:50:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01061639
Message ID:
01061754
Views:
22
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>
>I have a form with two grids, a parent and a child.
>
>When I move within the parent grid the child grid moves accordingly. However, the position of the "found" child record displays as the fifth row of its grid.
>
>How do I programmatically make the "found" record appear in the first row of the child grid?
>
>Thanks
>Vince

Vincent,
If you use relation or linkmaster,childorder,relationalexpr properties then you don't need to do any tricks. ie:
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  DataSession=2
  Height = 500
  Width = 600
  Add Object grdParent As Grid With ;
    top=0,Height=250,Width=600,RecordSource='customer'
  Add Object grdChild As Grid With ;
    top=255,Height=245,Width=600,RecordSource='orders',;
    Linkmaster='customer',ChildOrder='Cust_id',;
    relationalexpr='cust_id'

  Procedure Load
    Use customer In 0
    Use orders In 0 Order Tag cust_id
  Endproc
Enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform