Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display different field than the one bound in a combo-bo
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00607452
Message ID:
00607867
Views:
36
>>Refering to my example below. I am using a Combo-Box in a grid. I am
>>storing a 2 digit code in the address type field. This works correctly now.
>>This 2 digit code links to its description in the type table. I want to
>>store the code in the address table, but I want to display the address
>>description in the grid on the screen when it is not in focus.
>A combobox is always going to display the first column of it's RowSource, for
>this I'd SELECT your AddressType table into an array property of the cbo:
>select AddressDescription,  AddressType ;
>   into array this.aRowSource ;
>   order by 1
>Then set BoundTo = .t. and BoundColumn = 2

If you are displaying this in a grid, you might want to set the column's Sparse property to .F. -- otherwise, it will only display the combo in the active row. It doesn't look very pretty, though.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform