C# winform,dataGridView,光标选择最后一行,光标最后一行滚动

Application.DoEvents();

System.Threading.Thread.Sleep(30);

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

this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Selected = true;
this.dataGridView1.CurrentCell = this.dataGridView1[0, this.dataGridView2.Rows.Count - 1];

posted @ 2010-03-02 21:54  与时俱进  阅读(3530)  评论(0编辑  收藏  举报
友情链接:同里老宅院民居客栈