Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Boxes in Grids
Message
 
To
31/03/1998 19:16:05
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00088300
Message ID:
00100704
Views:
74
Brian:

Hi, were you able to fix the problem you had with using a combobox(dropdown list) in a grid? I have the exact same problem you had at the beginning of the thread and I wonder if you could share the recipe on you got it to work. Whenever I select a product from the list it flashes for about a milisecond and then disappears, giving me the blue background, although I'm able to get the information I need from it such as price and code value, but the description won't stay.

Thanks a lot,

Gil

>It should be a character string that is displayed in the box. Let me explain it like this. I have one table with 2 fields:
>
> ingred_id N 10
> ingredient C 50
>
>I have another table with several fields one of which is a foreign key from the above table (let's call the above table "A" and this table "B")
>
> ingred_id N 10
> other fields
>
>Now, the control source of the grid column is "B.ingred_id", and the sparse property is set to .f. The only control in the column is the combo box whose properties are set as follows:
>
>Control Source: A.ingred_id
>Bound Column : 2
>Bound To : .t.
>Column Count : 2
>Column Widths : 120,0
>Record Source : A.ingredient,ingred_id
>Style : 2- Dropdown List
>
>Since the combo displays the first column when it is "rolled up", and that column is of type character, it should work fine. But, when the combo box is the selected object, and it is "rolled up" it is only blue. If I give focus to another object, the combo displays properly. If I turn the "bound to" property to .f., the combo displays although it displays the wrong data (due to using the list index instead of the ingred_id) If I set up another combo box with the same properties but don't put it in a grid, it works properly. It has me puzzled. You are correct that if I changed it to a character key, that it would work right, but I can't really do that at this point. Thanks for your help. I hope I was able to explain it better in this post.
For every bug fixed, there is a bigger bug not yet discovered.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform