Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to have combobox in a grid column
Message
From
30/07/2006 19:15:12
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to have combobox in a grid column
Miscellaneous
Thread ID:
01141688
Message ID:
01141688
Views:
61
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
Next
Reply
Map
View

Click here to load this message in the networking platform