I have a datagrid/gridview. I\'m populating the grid with 10 rows initially. On a button click every time,I\'m keeping on adding 10 rows to the datagrid/gridview. Now I want
This post has been a god send. I am using VB in Visual Studio 2017 and just needed to go to the bottom of a DATAGRID to allow user to input data. By studying these answers I came up with this solution and thought others might find it useful.
Private Sub AddBUTTON_Click(sender As Object, e As RoutedEventArgs) Handles
AddBUTTON.Click
' Go to bottom to allow user to add item in last row
DataGrid.Focus()
DataGrid.UnselectAll()
DataGrid.SelectedIndex = 0
DataGrid.ScrollIntoView(DataGrid.SelectedItem)
Dim endofitems As Integer = DataGrid.Items.Count
DataGrid.ScrollIntoView(DataGrid.Items.GetItemAt(endofitems - 1))
End Sub