Reprinted from https://blog.csdn.net/voidfaceless/article/details/81286725
// Set the current behavior update_count
dataGridView1.Rows [update_count] = .selected to true ;
// this line is the most critical, otherwise always come back to the first line
dataGridView1.CurrentCell = dataGridView1.Rows [update_count] .Cells [ 0 ];
As shown in the code above.