trimtrom
asked on
Combobox in an ADO datagrid
Hello,
I am a VB6 beginner, and I am looking to use an ADO datagrid with a combobox. Basically I want to put the combobox on the current datagrid cell so that I can update the grid with a selection from the combo. The problem I have is this:
I can do it OK with a flexgrid, as follows:
Private Sub MSFlexGrid1_MouseDown(Butt on As Integer, Shift As Integer, x As Single, y As Single)
Combo1.Visible = False
Combo1.Left = MSFlexGrid1.Left + MSFlexGrid1.CellLeft
Combo1.Top = MSFlexGrid1.Top + MSFlexGrid1.CellTop
Combo1.Width = MSFlexGrid1.CellWidth
Combo1.Visible = True
End Sub
but I want to use a datagrid because a databound flexgrid is only readonly, and I want to be able to update my database table automatically. This I can do with a datagrid. But I can find no way of referencing the datagrid cell in the necessary way. Help! Is this impossible with a datagrid???
Alternatively, does anyone know a freeware grid with the above capabilities (ie databinding and cell referencing).
Many thanks,
Trimtrom
I am a VB6 beginner, and I am looking to use an ADO datagrid with a combobox. Basically I want to put the combobox on the current datagrid cell so that I can update the grid with a selection from the combo. The problem I have is this:
I can do it OK with a flexgrid, as follows:
Private Sub MSFlexGrid1_MouseDown(Butt
Combo1.Visible = False
Combo1.Left = MSFlexGrid1.Left + MSFlexGrid1.CellLeft
Combo1.Top = MSFlexGrid1.Top + MSFlexGrid1.CellTop
Combo1.Width = MSFlexGrid1.CellWidth
Combo1.Visible = True
End Sub
but I want to use a datagrid because a databound flexgrid is only readonly, and I want to be able to update my database table automatically. This I can do with a datagrid. But I can find no way of referencing the datagrid cell in the necessary way. Help! Is this impossible with a datagrid???
Alternatively, does anyone know a freeware grid with the above capabilities (ie databinding and cell referencing).
Many thanks,
Trimtrom
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.