Torna al Thread
Private Sub dgvFirmeBCode_CellValidating(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles dgvFirmeBCode.CellValidating
If dgvFirmeBCode.Rows.Count > 0 Then
For i As Integer = 0 To e.RowIndex - 2
If dgvFirmeBCode.Rows(i).Cells("TES1").Value = e.FormattedValue.ToString Then
duplicato = True
MsgBox("Articolo già inserito!")
e.Cancel = True
Exit For
Else
duplicato = False
End If
Next
End If
End Sub