Scroll to bottom of C# DataGridView

后端 未结 2 715
攒了一身酷
攒了一身酷 2020-12-16 09:42

I\'m trying to scroll to bottom of a DataGridView in a C# WinForm.

This code works with a TextBox:

textbox_txt.SelectionStart = textbox_txt.Text.Leng         


        
2条回答
  •  忘掉有多难
    2020-12-16 09:54

    To scroll to bottom of DataGridView try this.

    dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.RowCount-1;
    

提交回复
热议问题