Private Sub DataGridView1_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
For r As Integer = 0 To Me.DataGridView2.Rows.Count - 1
If Me.DataGridView1.CurrentRow.Cells(2).Value = Me.DataGridView2.Rows(r).Cells(1).Value Then
Exit Sub
End If
Next
Dim x As Integer
x = Me.DataGridView2.Rows.Count
Me.DataGridView2.Rows.Add()
Me.DataGridView2.Rows(x).Cells(0).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(1).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(2).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(3).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(4).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(5).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(6).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(7).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(8).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(9).Value = "Bar"
Me.DataGridView2.Rows(x).Cells(10).Value = "Bar"
End Sub