Datagridview Editable Combobox

  • Thread starter Thread starter Murali
  • Start date Start date
M

Murali

Hi,

i have a datagridview with one column set as combobox. the combobox is
bound to a dataset. now i want to able to type in the combobox. i did
this with changing the style of the combo to drop down. but when enter
the data and pressing tab the text disappears from the cell. can
anybody help me with this.

this is my code

Private Sub DataGridView1_EditingControlShowing(ByVal sender As
Object, ByVal e As
System.Windows.Forms.DataGridViewEditingControlShowingEventArgs)
Handles DataGridView1.EditingControlShowing
cb = CType(e.Control, ComboBox)
If Not cb Is Nothing Then
cb.DropDownStyle = ComboBoxStyle.DropDown
AddHandler cb.SelectedValueChanged, AddressOf cb_SelectedIndexChanged

End If
End Sub


Thanks and regards
 
Back
Top