Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox problem - BoundColumn??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00129328
Message ID:
00129638
Vues:
28
Hi Barbara,

.ColumnCount is set to 2 and .BoundColumn is 2 and the code is stored to the filed in the view. The problem is that the description is the .DisplayValue instead of the code. Thanks though.

>Colin,
>It seems to me that you'll get what you want - showing both the description and code number by simply showing both columns in the combo box by setting COlumnCount = 2. With your description first, then users can get to the desired entry by keying it in.
>
>If your bound column is 2 then the code number will be stored to your view.
>
>If you want to show the description on the form, you might want to have an un-bound textbox which shows the lookup-value of the code visible on the form.
>
>Barbara
>
>>Not a bad idea. However, even though it will look as needed it will not function as needed. For example, user will expect keyboard pnemonics to work on Building Desc. but it won't this way. Thanks very much for the info though. I was not aware of this functionality of the combobox and will just have to rethink my approach to the picklist.
>>
>>>Text portion of combo will always show the first column (DisplayValue), and combo.value traces the boundcolumn. So, if you switch columns you can the needed result, right? Also, you can make a trick and show second column as first one by setting ColumnWidth=0
>>>
>>>>I already have this. The dropdown of the combobox has 2 columns showing Building Desc and Building #. I need the textbox part of the combobox to show the Building # but it shows the Building Desc instead. Any ideas?
>>>>
>>>>>Set two column widths (e.g., 200,75) in the ColumnWidths property and the box will display both columns.
>>>>>
>>>>>>I have a combobox with the following settings:
>>>>>>
>>>>>>RowSourceType=3 - SQL Statement
>>>>>>RowSource=SELECT Buildesc, Buil FROM Buil WHERE STR(Buil.Proj,4)=mcproj ORDER BY Buildesc INTO CURSOR cBuilList
>>>>>>BoundColumn=2
>>>>>>BoundTo=.T.
>>>>>>ControlSource=Builinfoview.Buil
>>>>>>
>>>>>>What I am trying to do is allow the user to access the combobox items based on Buildesc because the users know the names better than the number. But I want the combobox to show the Building number (Buil). Any ideas? TIA
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform