Private Sub CopySelectedRows()
Dim exists As Boolean = False
For Each row As DataGridViewRow In Me.DataGridView1.SelectedRows
For Each row2 As DataGridViewRow In Me.DataGridView2.Rows
If row.Tag = row2.Tag Then
exists = True
End If
Next
If exists = False Then
Dim rowData(row.Cells.Count - 1) As Object
For i As Integer = 0 To rowData.Length - 1
rowData(i) = row.Cells(i).Value
Next
Me.DataGridView2.Rows.Add(rowData)
Me.DataGridView2.Rows(DataGridView2.RowCount - 2).Tag = row.Tag
End If
Next
End Sub