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 23:46:49
 
 
À
30/07/2006 21:21:44
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01141688
Message ID:
01141725
Vues:
13
Hi James,

Thanks for the help. It was a little tricky (the order in which some properties had to be set, such as setting the Combobox value correctly, then BoundColumn = 2 and then BoundTo = .T.), but I got what I needed. Thank you.

Alex


>Hi Alejandro,
>
>I use combos in grids all the time. I usually use arrays for the control source but what you are doing should work. I made some changes in your code below. See if that helps.
>
>>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.RowSource = 'Turnos.col1,col2' && Alias
>This.Columns[3].cboTurnos.ColumnCount=1
>This.Columns[3].cboTurnos.Columnwidths="100,0" && or what widhth you need in the first column.
>This.Columns[3].cboTurnos.style=2 && drop down list.
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform