Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using combobox in grid issue
Message
From
04/10/2006 16:28:56
 
 
To
04/10/2006 16:18:53
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01159154
Message ID:
01159517
Views:
37
>When I pull down the combo box it fills the text into the field, but as soon as I tab off then the data goes away. Any ideas?
>
>I am going to have to throw away that darn crystal ball of mine - it never works anymore < s >.
>
>Maybe if you showed me some code, I might.
>
>How is the combo set up - RowSOurceType, RowSource, Style, BoundColumn and so on
>
>And how is the grid column set up?
Thanks for the help, I realize my question was vague.

The Rowsourcetype of the combo is a sql statement with the rowsource = Select ModelOption.name from modeloption where optionid = v_option.optionid. The grid is built on v_option view and the controlsource of the column I'm working with is v_option.name. Style is combobox and the boundcolumn is 1, I've played with it bound and unbound. v_option is one record for each option for a particular model. The select in my combo box is to provide a quick pick of all the names that the option has for all models. That way if another model already has an appropriate name it could just be selected.

Entering data from scratch or selecting an option from the popup list fills in the field but then the data disappears as soon as you skip off to another record. The data stays fine if it's just a textbox but even an empty combobox will not hold the data that is typed in to the combobox. I feel like I'm just missing something on the combobox on how to get it to retain the data that is typed in or selected. There are no errors or indications there is a problem except that the data disappears. I have notice that if I have bound=.T. that the data does showup after I leave the record but then will disappear once you return to the record and it's never stored in the table. If bound=.F. then the data disappears as soon as you leave the record. The sparse also had no effect on retaining the data. I'm sure the view is fine because the data saves fine in all the other fields and when this one is a simple textbox.

Thanks again for all your help!

Greg
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform