2
votes

How do I make a WPF Toolkit DataGrid scroll to and select the bottom row without using the code behind?

For context, when the user wants to add a new row to the table I don't want them to have to scroll through hundreds of rows to get to the bottom.

2
If you don't want to use any code behind, when do you want the DataGrid to Scroll to the bottom? Do you raise a specific event? - Fredrik Hedblad
I'll decide that in the view model. I'm more interested in the how than the when. - Phil Gan

2 Answers

-1
votes

This will scroll/focus to the bottom of the grid

dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.RowCount-1;