Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 2005 如何在vb.net中填充datagridcombobox_Sql Server 2005 - Fatal编程技术网

Sql server 2005 如何在vb.net中填充datagridcombobox

Sql server 2005 如何在vb.net中填充datagridcombobox,sql-server-2005,Sql Server 2005,此代码给出了与datagridcombobox相关的错误。System.ArgumentException:DataGridViewComboboxCell值无效。有效语法是什么 Dim n As Integer = DataGridView1.Rows.Add() For Each dsrow2 As DataRow In dslocal2.Tables(0).Rows DataGridView1.Rows.Item(n).Cells(0).Value = dsrow2.Item("S

此代码给出了与datagridcombobox相关的错误。

System.ArgumentException:DataGridViewComboboxCell值无效。有效语法是什么
Dim n As Integer = DataGridView1.Rows.Add()
For Each dsrow2 As DataRow In dslocal2.Tables(0).Rows
    DataGridView1.Rows.Item(n).Cells(0).Value = dsrow2.Item("Slno").trim
    DataGridView1.Rows.Item(n).Cells(1).Value = dsrow2.Item("Prodcode").trim
    DataGridView1.Rows.Item(n).Cells(2).Value = dsrow2.Item("Remarks").trim
Next