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

Losing page scroll position

2 Answers 77 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kevin Cauchi
Top achievements
Rank 1
Kevin Cauchi asked on 28 Nov 2011, 09:24 AM
Hi there, 

I have an ascx control where I have a timer, a few textboxes and a datagrid in an AJAX panel.

Every 10 seconds, the timer calls a module that builds an SQL query depending on the textboxes given, then fetches the data and binds it to the grid.

My problem is that sometimes it loses its scroll position. It does not necessarily scroll to the top, sometimes it even scrolls to the bottom or middle of the page (This means it is not doing a full page refresh... which is good).

My suspicion is that it scrolls to the control that is focused on.

Anyway to stop this?

Thanks!

K

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 30 Nov 2011, 11:57 AM
Hi Kevin,

After the ajax request, the sroll position is reset to the position it had before the request started. So if the user scrolls, during the ajax request, it is expected to observe the described behavior.
See how this can be overcome in the attached demo.

Regards,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Kevin Cauchi
Top achievements
Rank 1
answered on 30 Nov 2011, 12:19 PM
PERFECT! Thanks!
Tags
Ajax
Asked by
Kevin Cauchi
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Kevin Cauchi
Top achievements
Rank 1
Share this question
or