Dim selectedRows As List(Of DataGridViewRow) = (From row In DataGridView1.Rows.Cast(Of DataGridViewRow)()
Where Convert.ToBoolean(row.Cells("checkBoxColumn").Value) = True).ToList()
For i As Integer = 0 To Me.DataGridView1.Rows.Count - 1
If Me.DataGridView1.Rows(i).Cells(0).Value Then
Permission_List.DataGridView2.Rows(i).Cells("Report_Code").Value = Me.DataGridView1.Rows(i).Cells("Report_Code").Value.ToString()
End If
Next
ผมจะส่งค่า form1.Datagridview1 ไปยัง form2.Datagridview2 คราวนี้มันขึ้น Error System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index'
รบกวนขอคำแนะนำด้วยครับ