Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo - Listbox
Message
De
25/11/2001 08:20:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00585457
Message ID:
00585482
Vues:
20
Hi Geoff.

>> This works fine except when I select the row I want it displays the contents of column 1 instead of column 2 (displays the Stno but I want the Street) in the text portion. <<

This is exactly what I would expect to happen. The combo's DisplayValue (what is displayed when the combo is "closed") always comes from column 1 of its RowSource.

Specifying column 2 as the BoundColumn just tells the ControlSource which column it should update its value from. IMHO, that is what makes combos so useful. We can set the ControlSource to a (surrogate) foreign key value in a lookup table while displaying the meaningful descriptive text that is associated with it.

If you want to display the street number and address in column 1, change the RowSourceType to 3-SQL and change the RowSource to something like this:

SELECT PADR( ALLTRIM( stno ) + ' ' + ALLTRIM( street ), 35 ) DispStreet, stno, strret FROM cust INTO CURSOR fred

and adjust the BoundColumn accordingly.

HTH.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform