for(int i=0;iif(textBox1.Text==dataGridView1.Rows[i].Cells[0].Value.ToString()){ this.dataGridView1.CurrentCell = this.dataGridView1[0, i]; break;}