开发者

vb.net DataGridViewComboBoxColumn

开发者 https://www.devze.com 2023-04-10 18:09 出处:网络
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 dropdow

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

精彩评论

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

关注公众号