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

[Solved] How get the Current ScollPosition Offset

1 Answer 81 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Dec 2010, 01:32 PM
How can I get the current Scroll Position Offset ? (Value)

I will binding the scrollbar offset/value with a other grid.

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 20 Dec 2010, 04:12 PM
Hello Daniel,

Basically, you may get the GridViewScrollViewer and use its horizontal and vertical offsets as follows:

var scrollViewer = this.playersGrid.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
var horizontalOffset = scrollViewer.HorizontalOffset;
var verticalOffset = scrollViewer.VerticalOffset;          

You need to add reference to the Telerik.Windows.Controls assembly (using Telerik.Windows.Controls;) in order to benefit from the ChildrenOfType<T> extension method.
Furthermore, in case you want to synchronize two grids, you may take a look at this forum thread for a reference and sample project.
 

Kind regards,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or