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

Lose scrollbar position after Ajax update

21 Answers 648 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 21 Feb 2008, 08:20 AM
Hi, is there any issue that may let scrollbar position reset to the top after RadAjaxManager update a region?

I try to dynamically load user controls in the Templated Columns, but after load it, the scrollbar's location always go to the top.

Cheer for your help.
Ricky.

21 Answers, 1 is accepted

Sort by
0
Ricky
Top achievements
Rank 1
answered on 21 Feb 2008, 08:27 AM
BTW: Even I use  RadAjaxMan.FocusControl(Reply_Btn.ClientID);, the focus stills scroll to the top.

Ricky.
0
Maria Ilieva
Telerik team
answered on 22 Feb 2008, 01:30 PM
Hi Ricky,

For the scenario you have described, a better approach would be to use AjaxPanel in opposite to AjaxManager. By default RadAjaxPanel maintains the focus of ajaxified control when the response ends.
For more information on manually controlling the scroll position, you could refer to the following online topic.

Give this suggestion a try and let us know how it goes.

Best wishes,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kyle Parker
Top achievements
Rank 1
answered on 30 Apr 2008, 12:59 PM
I am also running into this problem where the ajax update positions the scroll bar at the topmost part of the page.  Here's my scenario:

I am developing an application to allow students to apply for admission to the university.  On the page where they select a major, there is a dynamic user control that will display a supplemental application for particular majors, let's say "Music" in this example.  That "music" user control contains a checkbox list that has autopostback=true and a selectedindexchanged event that fires.  Depending on the selection, additional controls (contained within an ajax panel) may appear.

When I click the checkbox, the loading panel image appears over the section, the new area is set to visible, but then the page scrolls back to the top.

Here is a rough code snippet from the application:

Section2.aspx

<

telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="alpLoading">

<

bsu:IntendedMajor runat="server" ID="bsuIntendedMajor1" StartTabIndex="8" Required="true" ItemCount="1" OnIntendedMajorSelectedIndexChanged="bsuIntendedMajor1_IntendedMajorSelectedIndexChanged" />

</telerik:RadAjaxPanel>

Intended Major user control (no ajax panels on this user control)

- Loads the appropriate major user control, in this example "Music"

Music user control (no ajax panels on this user control)

<asp:Label runat="server" ID="lblMusicProgram" Text="Which music program(s) are you interested in (select all that apply)?" AssociatedControlID="cbxlMusicProgram"></asp:Label>

<asp:CheckBoxList runat="server" ID="cbxlMusicProgram" AutoPostBack="true" OnSelectedIndexChanged="cbxlMusicProgram_SelectedIndexChanged"></asp:CheckBoxList>

Code behind

Based on selection:

pnlMusicEducation.Visible = false;
pnlMusicTechnology.Visible =
false;

I'm not sure if this is enough of an explanation or code to fully understand the problem, so if I need to open a support ticket or submit additional details, please let me know.

Thank you,
Kyle Parker

0
Konstantin Petkov
Telerik team
answered on 05 May 2008, 10:05 AM
Hi Kyle,

Do you get the same problem replacing the RadAjaxPanel with ASP:UpdatePanel? I've just performed a quick search on the topic resulting in a couple of nice articles like this and this one.

I hope this helps!

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ricky
Top achievements
Rank 1
answered on 06 May 2008, 12:41 AM
0
Kyle Parker
Top achievements
Rank 1
answered on 10 Jun 2008, 08:39 PM
Good afternoon. 

I have continued working through this issue and I believe I have more information as to when this problem occurs. 

Here's a more detailed situation. 

If I have a radio button list and it has AutoPostBack=true and an event handler that then shows/hides a panel, the scroll position is fine.  The problems come in when that panel I'm showing contains a RadEditor (prometheus version).  Any time I dynamically (through an event handler and an ajax panel) show a panel containing the editor, the scroll position jumps to the top of the page.

Any thoughts as to why this is happening?  Again, this ONLY happens with the editor - all other controls or scenarios maintain the scroll position without the addition of any custom javascript.

Thank you,
Kyle Parker
0
Konstantin Petkov
Telerik team
answered on 11 Jun 2008, 06:41 AM
Hi Kyle Parker,

Did you give those suggestions from the previous replies a try? Does that function properly with an MS UpdatePanel?

If you need further assistance, it will be best if you can isolate the problem in a runnable sample, which we can test locally. If so, please send it through a formal support ticket and will quickly get back to you with resolution.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
SUNIL
Top achievements
Rank 2
Iron
answered on 23 Jun 2008, 04:29 AM
I think the page scrolling to top when using radeditor and rad ajax from prometius version (latest Q1 2008) is SURE BUG?

I have the same problem. As long as the ajax update includes the radeditor control, the page just scrolls to top. But as soon as I exclude the radeditor from ajax update, the ajax update then mantains scroll position.

I have put this problem in a support ticket, but frankly don't know how long it  will take Telerik to resolve. If you have a solution, can you please share it with me? Thanks.
I have spent a lot of time trying to debug this problem, but I cannot do anything since it's a bug in my opinion.

Sunil
0
Kyle Parker
Top achievements
Rank 1
answered on 23 Jun 2008, 10:41 AM
Sunil,

I would tend to agree that this is a bug.  I do not think the extra Javascript or work-arounds should be a requirement to use the editor in an AJAX panel when the other controls work just fine in that scenario.

I will be posting an example later today of the problem, unless you can post one earlier Sunil.

Kyle
0
Konstantin Petkov
Telerik team
answered on 25 Jun 2008, 11:48 AM
Hello,

We will surely investigate the problem. Unfortunately our tests fail to reproduce the problem so far. Can you guys open a formal support ticket and send a sample replicating the isolated issues? Your assistance is highly appreciated, thank you!

Please, also check if you get the problem after upgrade to the latest Service Pack 2 of RadControls for ASP.NET AJAX , the version labeled 2008.1.619.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kyle Parker
Top achievements
Rank 1
answered on 25 Jun 2008, 12:34 PM
I am working on generating a sample, so I'll be submitting a ticket soon...some other projects have slowed me down on this one!

thanks,
kyle
0
Kyle Parker
Top achievements
Rank 1
answered on 25 Jun 2008, 03:01 PM
I have created a very simple project that outlines this functionality and will be submitting a ticket with the source code.  I am using the Q1 release of the controls (I have not yet upgraded 2008.1.619).
0
Konstantin Petkov
Telerik team
answered on 25 Jun 2008, 03:08 PM
Hello Kyle Parker,

You can download the 2008.1.619 version hotfix and replace the dll/assembly reference in the respective project only. If you still get the problem, we will be expecting your support ticket. Thank you!

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kyle Parker
Top achievements
Rank 1
answered on 25 Jun 2008, 03:44 PM
Konstantin ,

Upgrading to the most recent release did fix the AJAX problem with the editor and the scroll position, but it introduced a new problem.  The shading of the AJAX panel is not lined up properly any more.  I'll submit a ticket for this one.

thanks,
kyle
0
SUNIL
Top achievements
Rank 2
Iron
answered on 25 Jun 2008, 03:52 PM
Konstantin ,

One of your support professionals is looking at this exact problem on my machine through remote connection . My project is a Sitefinity project and its impossible to send that project.

I haven't heard from her so I am guessing she is still trying to solve the problem I reported.

Thanks
Sunil
0
Konstantin Petkov
Telerik team
answered on 26 Jun 2008, 06:48 AM
Hello,

Kyle,
Thank you for submitting the ticket about the new problem. We will get back to you shortly. I'm glad the new version resolved the problem with the editor scrolling issue.

Sunil,
The RadEditor team investigate the problem you reported and we will get back to you as soon as possible.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kyle Parker
Top achievements
Rank 1
answered on 27 Jun 2008, 08:36 PM
One last update to this thread - the scroll position problem has been fixed using the new version in the following browsers:

Firefox 2.0 on the Mac
Firefox 2.0 on the PC
IE 7 on the PC

However, it still loses the scroll position with Safair 3.0.4 on the Mac.
0
Kyle Parker
Top achievements
Rank 1
answered on 27 Jun 2008, 08:52 PM
Add the new version of Firefox to the list of browsers that still lose the scroll position.
0
Konstantin Petkov
Telerik team
answered on 30 Jun 2008, 05:42 AM
Hello Kyle,

Thank you for your research on the matter and sharing your findings.

Would you please submit a regular support ticket sending a sample page/application which replicates this and add your findings there as well. Your cooperation is much appreciated, thank you!

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
iomega 55
Top achievements
Rank 1
answered on 14 Sep 2009, 04:31 AM
This is happening to me. I have my controls inside a RadAjaxpanel, but after a callback the scrollposition is lost. It returns always to the top.

Any suggestion?
0
Sebastian
Telerik team
answered on 14 Sep 2009, 12:38 PM

Hello iomega 55,

By default the scroll position should be retained if you scrollable container resides inside RadAjaxPanel (as my colleague Maria explained before).

If you have some custom scenario, can you check whether the same behavior is present when you replace the RadAjaxPanel instance with standard MS UpdatePanel? If so, you may need to implement your own mechanism (with javascript) to save the scroll position. Sample approach is discussed in this ASP.NET forum thread:

http://forums.asp.net/p/1262345/3399743.aspx#3399743

Kind regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Ricky
Top achievements
Rank 1
Answers by
Ricky
Top achievements
Rank 1
Maria Ilieva
Telerik team
Kyle Parker
Top achievements
Rank 1
Konstantin Petkov
Telerik team
SUNIL
Top achievements
Rank 2
Iron
iomega 55
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or