Datagridview Editable Combobox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Murali

    Datagridview Editable Combobox

    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_E ditingControlSh owing(ByVal sender As
    Object, ByVal e As
    System.Windows. Forms.DataGridV iewEditingContr olShowingEventA rgs)
    Handles DataGridView1.E ditingControlSh owing
    cb = CType(e.Control , ComboBox)
    If Not cb Is Nothing Then
    cb.DropDownStyl e = ComboBoxStyle.D ropDown
    AddHandler cb.SelectedValu eChanged, AddressOf cb_SelectedInde xChanged

    End If
    End Sub


    Thanks and regards
Working...