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.CurrentCell = this.dataGridView1[0, dataGridView1.RowCount - 1];


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