This is a migrated thread and some comments may be shown as answers.

RadGridView: Scrollbar resets when data is refreshed or ItemsSource is updated.

1 Answer 445 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 07 Nov 2013, 07:47 PM
My WPF question/problem is similar to the already answered question in this thread for WinForms: http://www.telerik.com/community/forums/winforms/gridview/scroll-bar-position-after-refreshing-grid.aspx

The problem is I don't have a way to get the Grid or Scrollbar controls/elements in the code behind because we are using a strict MVVM approach so this solution does not fix the problem I am having in WPF.

If there are any other tips or tricks you all might have that would work for MVVM, it would be much appreciated. This is one of the last problems we are having with a couple of our windows with large sets of data in a RadGridView. While the user is viewing data
in the Grid, I want the Grid to continue updating AND preserve the scrollbars position within the Grid -- instead of the scrollbars position returning to the top of the Grid. Thanks in advance for any help or guidance!

J

1 Answer, 1 is accepted

Sort by
0
Jacob
Top achievements
Rank 1
answered on 07 Nov 2013, 08:40 PM
Crazy enough I figured this out moments after writing this question... Instead of refreshing/updating the items in my list bound to the GridView I just updated the values of the properties on the items in my list. This allows me to keep the scrollbar position in tact when the data updates because the GridView is not forced to refresh the items but just the string values of the properties on those items. I hope this helps other in my situation in the future because this was a big headache!
Tags
GridView
Asked by
Jacob
Top achievements
Rank 1
Answers by
Jacob
Top achievements
Rank 1
Share this question
or