Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement