Hello, let's start with a little background on our app.
We use RadDocking with a RadGridView in one of the panes. The problem we have is the scroll position is getting reset to the top row when the pane containing the grid is pinned or unpinned (It seems to re-get the bound ItemsSource each time the grid is loaded and unloaded causing the grid to refresh). To try getting around this issue I tried getting and setting the scrollbar's value when the grid is loaded / unloaded. However, when I set the scrollbar's value, I am unable to physically move the scrollbar. I can however see the items changing as if it was scrolling properly, just the bar doesn't move. I am using the latest 9/24/2010 release.
I added a simple WPF ScrollBar control and I can set the value and still scroll the control properly.
Is this an issue with the ScrollBar the grid is using?
If there is any other recommendations on how to keep the scroll position, I am open to that as well.
Here is some quick code showing how I am doing this.
Thanks All for your help.
We use RadDocking with a RadGridView in one of the panes. The problem we have is the scroll position is getting reset to the top row when the pane containing the grid is pinned or unpinned (It seems to re-get the bound ItemsSource each time the grid is loaded and unloaded causing the grid to refresh). To try getting around this issue I tried getting and setting the scrollbar's value when the grid is loaded / unloaded. However, when I set the scrollbar's value, I am unable to physically move the scrollbar. I can however see the items changing as if it was scrolling properly, just the bar doesn't move. I am using the latest 9/24/2010 release.
I added a simple WPF ScrollBar control and I can set the value and still scroll the control properly.
Is this an issue with the ScrollBar the grid is using?
If there is any other recommendations on how to keep the scroll position, I am open to that as well.
Here is some quick code showing how I am doing this.
private
void
Window_Loaded(
object
sender, RoutedEventArgs e)
{
// Get GridView ScrollBar object
ScrollBar verticalScrollBar =
this
.RadGridView1.ChildrenOfType<ScrollBar>().Where(s => s.Orientation == Orientation.Vertical).First();
// Set value on GridView - Goes to bottom, but cannot get scrollbar to move
verticalScrollBar.Value = verticalScrollBar.Maximum;
// Set value on WPF ScrollBar - Goes to bottom, and scrollbar moves fine
this
.WpfBar1.Value =
this
.WpfBar1.Maximum;
}
Thanks All for your help.