Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Issue
Message
 
To
07/02/2002 15:45:55
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00616904
Message ID:
00617343
Views:
35
Hi Dan

You can do this by specifying the controlsource of the column like this:
ThisForm.Friendly(Table.Value)
The Friendly() function could then return "14 -Iowa". Then you must set the BoundColumn to .F. and set the controlsouce of the combobox to the Table Value.

So the column will show the Friendly value when it does not have focus and when it does have focus the combobox will also display the friendly value assuming Sparse is .F.

Simon White


>>>>>Two part question.
>>>>>
>>>>>I have a grid with a column that contains a combobox. The combo contains user friendly description, e.g. "14-Iowa". The value I store in the table will be the number 14. If I set the column to sparse the 14 is displayed instead of the nice description in the combobox. Anyway to get it to diplay with sparse on?
>>>>
>>>>I think you have to change .BoundColumn.
>>>
>>>Thanks Hilmar.
>>>
>>>My combo has two columns, "14-Iowa", and "14". The combo is .BoundTo = .t. and the bound column is 2. I don't want to store "14-Iowa" in the table. What I want to do is display "14-Iowa" when that cell does not have the focus, instead of 14.
>>>
>>>Dan
>>
>>What I usually do is set .ColumnCount = 1, but I specify two columns in the RowSource. This will make the second column invisible.
>>
>>BoundColumn would be this second, invisible, column. In your example, column1 would be "14-Iowa", column2, "14". The second column is saved in the current table.
>>
>>HTH, Hilmar.
>
>That's basically what I'm doing. I have no probs with the combobox. It works great. When I set sparse to true on the column I want the "look" of the combo to go away and just display "14-Iowa", not the value 14.
>
>Dan
Simon White
dCipher Computing
Previous
Reply
Map
View

Click here to load this message in the networking platform