I think I am stupid. I searched now for 15 minutes, and found several different solutions for scrolling on datagrids, but none seems to work for me.
I am using WPF w
If you used dataview for the datagrid.datacontext, you can use this:
private void dgvRecords_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
var dv = dgvRecords.DataContext as DataView;
if (dv.Count > 0)
{
var drv = dv[dv.Count - 1] as DataRowView;
dgvRecords.ScrollIntoView(drv);
}
}