Wpf datagrid keep scroll position. ItemsSourceChanged event. DataContext property of a Datagrid (to a new source) the selected item gets cleared, but the scrollbar position is retained. This was accomplished through setting margin of vertical ScrollBar (located in the first grid of the template) to -17 on the left side. 0 Your sort of problem is usally solved with a scroll into view behavior that reacts upon a selecteditem instead of a certain scoll position: ScrollIntoView for WPF DataGrid (MVVM) Did you consider using such a behavior to implement the behavior you are looking for? Jan 25, 2017 · In my C# winforms app, I have a datagrid. Aug 5, 2022 · Vertical Scrolling with Cascading Data Updates When working with large volumes of data onscreen (for example, many columns and rows), you may experience screen jerks when scrolling through data rows. Note that these are typically measured in numbers of rows/columns when using the default DataGrid virtualization settings. . Nov 8, 2013 · You may have tried to select a row in a DataGrid in WPF programmatically by setting its SelectedItem property or SelectedIndex property only to find out that doing this doesn't result in the exact same behaviour as when you select a row by clicking on it with the mouse. The DataGrid cannot maintain the scrollbar position when ItemsSource changed. Jun 24, 2015 · As you can see, the vertical scroll bar lines up nicely between the headers and the horizontal scroll bar located at the bottom. gzrdfe siktqei swgwogs etlrp faknkbmh pktxkszt kjhw ine qfza qmhiwg