将GridView自动滚动到LastRow

时间:2010-11-24 11:22:02

标签: .net winforms telerik-grid

环境:

   Windows Forms 
   C# 4.0
   RadGridView (Telerik 2010)

如何自动滚动GridView以始终查看Last Row?

我想要类似的东西:

ListBox1.TopIndex = ListBox.Items.count -1;

但是对于GridView

提前致谢..

3 个答案:

答案 0 :(得分:5)

谢谢,我知道了,它的:

  radGridView1.TableElement.ScrollToRow(radGridView1.Rows.Last());

答案 1 :(得分:1)

尝试DataGridView.FirstDisplayedScrollingRowIndex属性。

答案 2 :(得分:1)

dataGridView1.DataSource = dt; dataGridView1.FirstDisplayedScrollingRowIndex = dt.Rows.count-1;

dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.Rows.count-1;