Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox workaround
Message
From
05/11/1997 12:35:35
 
 
To
05/11/1997 12:27:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00058366
Message ID:
00058413
Views:
28
>>>Has anyone found a workaround for a combobox not being able to display a value that does not exist in it's rowsource? I would like to have it display the value in the controlsource, but I don't want to fill the rowsource until the combobox actually gets the focus. I have a form that has a lot of comboboxes and it would require a lot of individual cursors to be populated before the form comes up. I would rather use one parameterized view for the rowsource of these comboboxes and have the pick lists available only when the combobox gets focus.
>>
>>It's MS that found the workaround and gave us Combo.DisplayValue property to display value which is not in RowSource.
>
>My combobox is bound to a 'view1.code' field - I want to display the 'view2.desc' field before the rowsource gets filled. If DisplayValue will do this, where do I set combo.DisplayValue? The rowsource is set to view2.code, desc, rowsourcetype = fields. I have tried everything I can think of and still cannot get the combo to display the value.

There are couple helpful tips about combos, and the main one is following: if you got a problem with bound combo, then make it unbound. Next thing for your case is following: DisplayValue will show by default first column of the RowSource, Value will reflect column #=Combo.BoundColumn. Also I see some problem with your approach: if you want to show something from View2, then you should fill View2 first, and this is logically and physically the same as filling the RowSource.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform