Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
1 to many with listbox and grid
Message
From
15/08/2006 17:57:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/08/2006 16:55:20
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01145762
Message ID:
01145814
Views:
22
>Whats the best way to use views with a list box and grid?
>
>I indexed the views. Then set a relation to them using "Set relation to".
>But using "Set skip to" added multiple records to the list box.
>I also tried setting the Linkmaster and RelationalExpr in the grid. But nothing worked properly.
>
>Should I just assume that the listbox is the wrong way and use grids for the one and the many views?
>Thanks,
>Daniel

Maybe you don't need neither views nor relation.
Using a listbox or grid is up to you (I prefer grids generally).

ie:
*form.init
with this.lstCustomers
 .RowSourceType = 3
 .Rowsource = "select company,cust_id from customer order by 1 into cursor crsCustomer"
endwith

with this.grdOrders
 .ColumnCount = -1
 .RecordSourceTYpe = 4
 .RecordSource = "select order_id,order_date"+;
   " from orders where cust_id = crsCustomer.cust_id"+;
   " into cursor crsOrders"
endwith 

* lstCustomers.interactivechange
with this.parent.grdOrders
 .RecordSource = .recordsource
endwith 
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