Dtagridview 光标定位最后行的方法 - 转自:jin_yao_chi的博客

定位行:

1.BindingSource.MoveLast();

2.dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.Rows. Count-1;

定位单元格:

1.dataGridView1.FirstDisplayedCell = dataGridView1.Rows[xxx].Cells[0];
2.dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count-1].Cells[0];
   dataGridView1.BeginEdit(true);

猜你喜欢

转载自www.cnblogs.com/YuanDong1314/p/8973128.html