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

Scroll to top using client-side script after AJAX

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ray Bezuidenhout
Top achievements
Rank 1
Ray Bezuidenhout asked on 01 Mar 2011, 10:49 PM
I am using a grid of which the SaveScrollPosition="True" so that the position is saved during AJAX postbacks.  I have however implemented a custom client-side script to handle scrolling when the bottom and top of the grid is reached (based on http://www.telerik.com/help/aspnet-ajax/grdvirtualscrollpaging.html) so that paging is "automated".  

The issue is now that when I reach the bottom of the grid and the AJAX request is fulfilled then the position is still at the bottom of the grid.  I want it to be at the top of the grid and visa-versa when I reach the top of the grid.

I have looked and tested all the scenarios proposed in the demos and sample that I could find, but must be missing something. I believe I must use ScrollTop, but cannot find a proper description of how to implement such a client-side script when the SaveScrollPosition is enabled.

Any help would be highly appreciated.

Regards,
Ray 

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 07 Mar 2011, 11:30 AM
Hi Ray,

The approach which is by default working for scrolling to top after AJAX is described in this help article.
Scroll to top after AJAX

Have you tried this one and what was the result?

Regards,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Ray Bezuidenhout
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or