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

Page scroll goes top after an ajax update

7 Answers 291 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Plamen
Top achievements
Rank 2
Plamen asked on 11 Feb 2010, 02:53 PM
Hello, Telerik Team and Community!
I need your help.

I have a problem with RadAjaxPanel. I put two separate RadGrids in it. The second RadGrid has a button on every row to update a quantity value, entered in a RadNumericTextBox. Whenever I update this quantity, the scroll goes up, and it goes not to the beginning of the page, but to the point where the Ajax Panel begins.

This is kind of strange behavior and thus our users lose the interactivity Ajax has to offer.

I've read about this being reported as bug back in 2008. Now it's 2010 and still encounter the same problem.
So, what should I do to avoid it?

Thanks,
Plamen Petrov
Application Software Systems

7 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 11 Feb 2010, 04:07 PM
Is the problem that the page is actually going to the top of the RadAjaxPanel or is it the RadGrid's scroll area that is going to the top after the Ajax request. If it's the RadGrid you should set the SaveScrollPosition="true" from the ClientSettings.Scrolling settings.

I don't know if that's what you're asking because I'm assuming the second RadGrid control you mention is under the first, thus my suggestion is totally wrong, but if it's above the first than I think that should solve the scroll problem.

I hope that helps.
0
Pavlina
Telerik team
answered on 11 Feb 2010, 04:07 PM
Hi Plamen,

Please examine the following help article, which elaborates on this subject and let me know if it works for you:
http://www.telerik.com/help/aspnet-ajax/ajxpanelscrolltotop.html

I hope this helps.

Greetings,
Pavlina
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
Plamen
Top achievements
Rank 2
answered on 12 Feb 2010, 06:50 AM
Robertw102, I have two RadGrids and the problem is in the vertical scroll of the browser, I don't use scrolling in any of the grids. Whenever the page becomes longer, when I make an update it would go to the top of the RadAjaxPanel. However, thank you for your answer, I appreciate it, next time I will be more specific with my explanation.

Pavlina, I read trough this topic before writing here and I don't see how it helps me. I want the page to stay where the ajaxified control is, not go to the top of the page. That as far as I know should be the norm when using RadAjaxPanel, but alas it isn't in my case. So, my problem isn't solved.

0
Accepted
Pavlina
Telerik team
answered on 17 Feb 2010, 04:12 PM
Hello Plamen,

I noticed that you have opened a duplicate post on the same matter. Please, refer to the other support ticket post for additional information. To avoid duplicate posts, we can continue our communication there.

However, attached to this message is a simple working application, which is working as expected. Please give it and let me know if it works for you.

Regards,
Pavlina
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
Plamen
Top achievements
Rank 2
answered on 19 Feb 2010, 09:41 AM
Hello, Pavlina!

Thank you for your example! You should know I was unable to run it, because i got the following exception:

System.Data.SqlClient.SqlException: The database 'C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\RADAJAXPANEL\APP_DATA\NORTHWIND.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported. 
 

It's some sort of compatibility issue on Microsoft's part, but I thought you would like to know about it (in case you didn't).

However, I resolved the issue after looking at the code of your sample and then completely reviewing my code. It turned out that another control on the page was stealing focus, so this was why browser scroll bar moved the to the top (that was also where the RadAjaxPanel started by coincidence).

Thanks again!
Best,
Plamen Petrov
Application Software Systems
0
Josef
Top achievements
Rank 1
answered on 05 Jul 2013, 01:52 PM
Hi Plamen!
Im having a similar issue.
I hava a few textboxes at the top of my page followed by 2 grids and a treelist at the bottom. Both the grids and the treelist have controls inside them which cause ajax-postbacks. After the postback the focus will jump to the last textbox that had the focus before the postback.
Even if i blur the textbox by clicking on another (non-textbox) control or anywhere else on the side, if i then trigger a postback, the focus is set to the textbox and the page is scrolled up.

How did you prevent the controls on your page from stealing focus? Is this expected behaviour?

Thanks,
Josef Tiefenbacher 
0
Pavlina
Telerik team
answered on 10 Jul 2013, 08:55 PM
Hello Josef,

By default RadAjaxPanel maintains the focus of ajaxified control when the response ends. Therefore, I suggest you try wrapping RadGrid/RadTreeList control in RadAjaxPanel and let me know if this makes any difference.

Regards,
Pavlina
Telerik
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 the blog feed now.
Tags
Ajax
Asked by
Plamen
Top achievements
Rank 2
Answers by
robertw102
Top achievements
Rank 1
Pavlina
Telerik team
Plamen
Top achievements
Rank 2
Josef
Top achievements
Rank 1
Share this question
or