此代码可以加载DataGridView列,但无法从此列中选择值

时间:2014-10-02 20:12:17

标签: vb.net datagridview

Dim Raw As New DataGridViewComboBoxColumn()
Raw.HeaderText = "Raw Material"
Raw.Name = "cmb"
con.Open()
cmd = New SqlCommand("select Raw from Raws ", con)
DR = cmd.ExecuteReader
While DR.Read()
    Raw.Items.AddRange(DR("Raw").ToString())
End While
DR.Close()
DataGridView1.Columns.Add(Raw)
con.Close()

我想知道如何使用代码从datagridview列中选择一个值。

0 个答案:

没有答案