vb.net DataGridViewComboBoxColumn

发布于 2024-12-08 09:24:32 字数 181 浏览 2 评论 0原文

当使用可编辑的 DataGridViewComboBoxColumn 时,它似乎工作得几乎很好。

用户可以在文本中键入新值,也可以从下拉列表中选择预定义的选项。

问题是,当有人开始输入时,当您单击 Enter、Tab 或右箭头跳到下一个字段时会出现预定义选项,该选项就会从列表中消失。

有什么想法吗?

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

Users can either type a new value into 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听风吹 2024-12-15 09:24:32
 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
 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文