【问题标题】:How to get selected DataGridViewComboBoxColumn values in vb.net?如何在 vb.net 中获取选定的 DataGridViewComboBoxColumn 值?
【发布时间】:2010-12-09 04:13:17
【问题描述】:

如何在 vb.net 中获取选定的 DataGridViewComboBoxColumn 值?

【问题讨论】:

    标签: .net vb.net datagridview selectedvalue


    【解决方案1】:

    我的谷歌搜索中的第一个链接:-)

    How to: Access Objects in a Windows Forms DataGridViewComboBoxCell Drop-Down List

    在这个 MSDN 页面上有一个完整的例子。

    关于获取选定值的具体注意事项如下

    与 ComboBox 控件不同, DataGridView 类型没有 用于检索的 SelectedItem 属性 当前选中的对象。 相反,您必须设置 System.Windows.Forms.DataGridViewComboBoxColumn.ValueMember 或者 System.Windows.Forms.DataGridViewComboBoxCell.ValueMember property 上的属性名称 您的业​​务对象。当用户 进行选择,指示 业务对象集的属性 单元格值属性。

    单击代码框中的“VB”以查看相应的 VB.net 代码语法

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多