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

Scroll position

4 Answers 57 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.
Keith
Top achievements
Rank 1
Keith asked on 24 May 2011, 08:48 PM
How would I go about resetting the horizontal scroll position on the grid programatically back to unscrolled?

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 May 2011, 06:54 AM
Hi,

 You can use ScrollIntoView() method of the grid to scroll to the first column. 

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Keith
Top achievements
Rank 1
answered on 25 May 2011, 04:00 PM
This does not work.
0
Milan
Telerik team
answered on 26 May 2011, 08:45 AM

Hello Keith,

Here is more information about this approach:

private void Button1_Click(object sender, RoutedEventArgs e)
{
    this.playersGrid.ScrollIntoView(this.playersGrid.Items[0], this.playersGrid.Columns[0]);
}
  
private void Button2_Click(object sender, RoutedEventArgs e)
{
    this.playersGrid.ScrollIntoViewAsync(this.playersGrid.Items[0], this.playersGrid.Columns[0], null);
}



All the best,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Keith
Top achievements
Rank 1
answered on 13 Jun 2011, 05:55 PM
This option only works if there is data in the grid.  How can I make this work when there is no data?
Tags
GridView
Asked by
Keith
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Keith
Top achievements
Rank 1
Milan
Telerik team
Share this question
or