Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox in Grid - display weirdness
Message
De
05/03/2002 19:04:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00628629
Message ID:
00628788
Vues:
25
Hello Bruce.

I have a grid with a combobox in one of the columns. It's a typical 2-column combobox, with a description and character-type primary key as its 2 columns.

Outside the grid it works just fine. Inside the grid, it switches between displaying the description and the value.


Obviously you have the column's Sparse property set to False < s >. The easiest way to make this work is to set column.sparse to True, although personally, I think it makes the grid look cluttered and busy.

If your combo is of style 2-DropDown List, you can do this:

[ 1 ] Set Column.Bound = .F.
[ 2 ] Set of the colum's controlSource as something like this:
( IIF( SEEK( MyTable.ForeignKeyValue, 'LookupTable', 'LookupTablePK' ), LookUpTable.Description, '' ) )
[ 3 ] Set up the combo's controlSource as the foreign key value in the grid's RecordSource
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform