Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.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
Vb.net 对于每个无法正常工作的Gridview_Vb.net_Linq - Fatal编程技术网

Vb.net 对于每个无法正常工作的Gridview

Vb.net 对于每个无法正常工作的Gridview,vb.net,linq,Vb.net,Linq,你能帮我做一下吗?对于每个循环,它只在我的数据库中多次保存Gridview的第一行。如果我的密码有什么问题,你能帮我吗。提前谢谢 这是我的密码 Using _adTransPlatts As New TradingTransactionRepository For Each row As GridViewRow In GridView1.Rows_adTransPlatts.AddPlatts(GridView1.Rows(0).Cells(1)

你能帮我做一下吗?对于每个循环,它只在我的数据库中多次保存Gridview的第一行。如果我的密码有什么问题,你能帮我吗。提前谢谢

这是我的密码

 Using _adTransPlatts As New TradingTransactionRepository

        For Each row As GridViewRow In 
              GridView1.Rows_adTransPlatts.AddPlatts(GridView1.Rows(0).Cells(1).Text, GridView1.Rows(0).Cells(2).Text, GridView1.Rows(0).Cells(3).Text)
        Next
             MsgBox("Completed")
    End Using
将GridView1.Rows(0)更改为currentRow

 For Each currentRow As GridViewRow In GridView1.Rows
        _adTransPlatts.AddPlatts(currentRow.Cells(1).Text, currentRow.Cells(2).Text, currentRow.Cells(3).Text)
 Next

GridView1.行(0)总是指第一行

@Mate谢谢!作为回答补充