dataGridView修改完数据后,滚动条位置不变,强制选择当前行

  dataGridView1.FirstDisplayedScrollingRowIndex = row;

           dataGridView1.Rows[row].Selected = true;

           dataGridView1.Rows[row].Cells[0].Value = true;

           dataGridView1.Rows[0].Selected = false;

           // 强制显示当前行

           dataGridView1.CurrentCell = dataGridView1[0, row];

相关内容推荐