hi
I have a datagridview which has 8 columns.when user types sth in cell 7, the cursor should go to the new row.I write these codes but cells of previous row is still in edit mode.

this.dataGridView1.Focus();
this.dataGridView1.CurrentCell = this.dataGridView1[0, dataGridView1.RowCount - 1];

dataGridView1.BeginEdit(false);

i mean now first cell of the next row is selected but the previous cell is in edit mode.
what should I do?

Use,

...
SendKeys.Send("{F2}");
..
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.