Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox in a grid
Message
De
05/03/1999 06:49:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Listbox in a grid
Divers
Thread ID:
00194371
Message ID:
00194371
Vues:
56
I want to add a dropdown combobox to a grid of a table that lists the possible choices in the related table. I need to do this at runtime. The grid table is "Wire" and the table that holds the possible choices is "Rod". I need to display the data from the Wire table but only allow the user to select a choice from the Rod table.

In the init of the grid I have the following code which allows me to find the column I want then modify it. At least that part works!

LOCAL lnColCnt, lnCnt
lnColCnt = This.ColumnCount
lnCnt = 1
FOR lnCnt = 1 to lnColCnt
IF This.Columns(lnCnt).ControlSource = "rodid"
This.Columns(lnCnt).AddObject("cboRodId", "COMBOBOX")
This.Columns(lnCnt).cboRodId.Visible = .T.
This.Columns(lnCnt).Sparse = .F.
ENDIF
ENDFOR

The combo box does not show up.

How do I set the data in the combo box to only allow a choice from the second table?

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform