Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid control and dynamic lookup
Message
From
13/11/2007 13:37:46
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
13/11/2007 13:17:54
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01267478
Message ID:
01268697
Views:
12
>Based upon no suggestions since my original question it appears that there may be no straightforward / pure "ControlSource" solution to my display question.
>
>If someone else has a similar display question, here is my solution:
>
>The Issue:
>In a grid's TextBox control I needed to display a text string based upon a field's key value, i.e. "Acme Company, Inc." from a key value "00012345". This would be simple in a ComboBox however the control must be READONLY and STYLE = 0, Dropdown Combo, apparently cannot be made READONLY.
>
>My Solution:
>I resorted to a child cursor (of the company names) with an index tag of the names' key values. Then, from the parent cursor (grid's RECORDSOURCE), I set a relation (the key value) into the child cursor.
>
>I ideally wanted to avoid a SET RELATION and, instead, handle the display issue basically within the control itself.
>
>If anyone has an "ideal" solution (like just described) I'd still appreciate hearing it. Thanks.

Ideal varies from person to person in this standards-less industry.

If you were using an n-tier design to grab your data - the answer to this would be a no-brainer. You'd alter the query populating this grid to join to the company table and grab the name. Then you set the controlsource to show the company name.

I hope that points you in a helpful direction.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform