String searchValue = "somestring"; int rowIndex = -1; foreach(DataGridViewRow row in DataGridView1.Rows) { if(row.Cells[1].Value.ToString().Equals(searchValue)) { rowIndex = row.Index; break; } }