Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to have combobox in a grid column
Message
De
30/07/2006 19:15:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
How to have combobox in a grid column
Divers
Thread ID:
01141688
Message ID:
01141688
Vues:
57
Hi,

I would like to have a combobox in a grid to offer options from column one of a cursor and is bound to column two of the same. Ideally the column would not be sparse. I am using Codemine controls. The grid cursor is requeried during the operation so I have placed code in the grid refresh to reconstruct the layout (simplest way I know to do this).

The RecordSource for grid is TurnosHorario and the RowSource for combobox is Turnos which has two columns, cDescrip and idTur. This is the code related to the combobox in the grid refresh:
This.Columns[3].Header1.Caption = 'Turno'
This.Columns[3].ControlSource = 'TurnosHorario.idTur'
This.Columns[3].Width = 120
This.Columns[3].CurrentControl = 'cboTurnos'
This.Columns[3].Sparse = .T.
This.Columns[3].cboTurnos.RowSourceType = 2 && Alias
This.Columns[3].cboTurnos.RowSource = 'Turnos' && Alias
This.Columns[3].cboTurnos.BoundTo = .T.
This.Columns[3].cboTurnos.BoundColumn = 2
The problem is that the comboboxes appear empty and when I change one they all change, which makes me questions whether comboboxes are possible at all inside a grid.

TIA,

Alex
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform