开发者

vb.net DataGridViewComboBoxColumn

When using the editable DataGridViewComboBoxColumn it appears to be working almost great.

Users can either type a new value i开发者_开发百科nto the text or select a predefined option from the dropdown.

The problem is when somebody starts typing and a pre defined option appears when you click enter, tab, or right arrow to jump to the next field the option disappears from the list.

Any ideas?


 Private Sub dgDetails_CellLeave(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgDetails.CellLeave
        If Not cb Is Nothing Then
            cb.SelectedIndex = cb.FindStringExact(cb.Text)
        End If
    End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜