I have a datagridview with a datagridviewcomboboxcolumn on which I enabled editing. This works as long as no datapropertyname is set for the column.
when the datapropertyname is set and i'm typing in the combobox the item is suggested as it should, but when pressing ENTER the previously selected item is again selected.
While when the datapropertyname is not set after pressing enter the suggested item is selected.
My code to enable editing:
Private Sub DataGridView1_EditingControlShowing(ByVal sender As Object, ByVal e As DataGridViewEditingControlShowingEventArgs) Handles DataGridView1.EditingControlShowing
If e.Control.GetType Is GetType(DataGridViewComboBoxEditingControl) Then
Dim cb As ComboBox = TryCast(e.Control, ComboBox)
If cb IsNot Nothing Then
cb.DropDownStyle = ComboBoxStyle.DropDown
End If
End If
End Sub