public void RemoveJoin(string left) { int idx = -1; foreach (DataGridViewRow row in grdJoin.Rows) { if (row.Cells[0].Value.ToString() == left) { idx = row.Index; } } if (idx >= 0) grdJoin.Rows.RemoveAt(idx); }