Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop-down list and alpha order
Message
De
07/07/1999 17:29:51
 
 
À
07/07/1999 17:07:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00238533
Message ID:
00238554
Vues:
15
>>I’m populating the display values of a drop-down list from a cursor.
>>
>>THISFORM.CodeFrame.SponsorPage.SponCatCbo.RowSource=""
>>SELECT nSpCatKey,cSpCatName FROM SponCategory ORDER BY cSpCatName
>>THISFORM.CodeFrame.SponsorPage.SponCatCbo.RowSource="Q_SponCat.cSpCatName"
>>
>>When the form is displayed the value in SponCatCbo is wrong, if I order by nSpCatKey it’s right. I understand why it’s doing this but I don’t know how I can display the values in alpha order and still display the right value. I’ve tried setting BoundTo=.t. but then the field is empty.
>>
>>Any help on this would be appreciated.
>>
>>/Chris
>
>The information you supplied is not complete, so I will guess. It seem to me that you pick-up two fields (Integer and Character) and want to bind your combo on integer, showing ordered Characters in the list portion. You may accomplish these by following settings:
>.Rowsourcetype=6
>.Rowsource="mycursor.charfield,intfield"
>.BoundTo=.T. && it's necessary for bound combos only
>.BoundColumn=2
>When you create a cursor, order it by character field.

Edward - Thank you. It now works as it should, I was missing the BoundColumn.

/Chris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform