Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! Multi-Column Dropdown Combo.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00271898
Message ID:
00271953
Vues:
18
>>>>Yes, that's correct, Evan. I've tried boundcolumn=2 and that made no difference at all.
>>>>
>>>>>I would imagine that you are doing something like displaying a code with a description. What you can do is set the boundcolumn to whichever column you want to store in the variable or table. You can then display 1 or both of the columns in the combo.
>>>>>
>>>>>>I've had no trouble with single column Combo boxes, but now I am trying to create a Dropdown Combo with two columns. The Rowsource is a SQL Select statement into a Cursor. I want the first two columns to display in the list and both be visible after selection.
>>>>>>
>>>>>>When the Combobox initialises, it is blank.
>>>>>>When the list drops down, both columns are showing fine.
>>>>>>On selection, only the first column shows in the display. If I can't display both columns, I need the second to display, not the first.
>>>>>>
>>>>>>How do I get both columns to be visible when the Combobox is first displayed and also after selection?
>>>>>>
>>>>>>I've tried lots of permutations - and searched the help. There must be something simple I'm missing. Can anyone help.
>>>>>>
>>>>>>I'm using VFP5a
>>>>>>
>>>>>>David O'Brien
>>>
>>>
>>>You might try to populate an array with your SQL Select Statement and build the values in the combo box from the array. Here is some code ...
>
>>Bill
>
>Thanks Bill, I think this should work - but it is a bit of a 'workaround' for something that I would have thought should be simple. I mean, the list lists OK, it just won't display as I'd like it to.
>
>David

You could call a pick list from the text box containing this information rather than use a combo box. The pick list is a form with a grid of as many columns as you want to display and populated with your cursor query. It can be in the order of one column or the other and there are classes (ingrid) which allow interactive reordering of the grid by column. Once you select one of the records, the value of the record is returned to the text box from where you looked it up.

Bill
CySolutions, Medical Information Technology
You're only as good as your last
success, so . . .If it works. . .don't fix it!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform