Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid & text box woes
Message
 
To
28/04/1997 13:43:13
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00029945
Message ID:
00029953
Views:
25
>Here's what I want to do, but am having much difficulty.
>
>On a form, I want a text box which lists a company name from my company table. Based on which company name is displayed at the moment (I have a "Next" command button to skip to the next company/record) I want my grid to display the names and assorted info about the employees in a predefined list of positions for that company alone.
>
>My grid is based on a local view which contains the position field from my Position table and Name etc. fields from my Person table. Since these two tables have a many to many relationship (one person can hold more than one position, and one position can be held by more than one person), I had also created a Contacts table which contains PersonID and PositionID fields to link the two tables.
>
>I'm having a problem with my Data Env. only allowing me to make a relation between Company table and "Contacts" view with the "Contacts being the parent since I can't figure out (doesn't look like you can) how to make an index in my "Contact" view which would allow me to make Company the parent.
>
>My questions:
>
>how do I just show the specific company's contacts in the grid, not all in the table/view?
>
>how do I link the grid and the company text box so when I change the company Name, the grid refreshes to show the "new" company's contacts?
>
>and one last "wish"... I'd love for the user to be able to click the grid headers to reorder the grid, i.e. click the "Position" header to order by position and "Name" header to reorder by employee name. I've seen how to do this with tables and indexes, but not how to do this with views.
>
>Many TIA,
>Mandy

it really sounds like the company should be the parent for this setup. what happens when you try to set that relation? once this relation is set, showing only the current company's contacts is easy. set the parent and relationalexpr properties for the grid to the appropriate values.

you can index views on the fly
   select myview
   index on field1 tag field1
   index on field2 tag field2 additive
then use this just like a table and index...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform