Dim name As String = "CustName" Dim columnIndex As Integer = 1 'this is the column index which contains the value to compare For Each dr As DataGridViewRow In DataGridView1.Rows If name = dr.Cells.Item(columnIndex).Value Then 'do anything End If Next dr
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)