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

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

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
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

I also found this one, http://www.codeproject.com/KB/ajax/PersistDIVScrollPosition.aspx.
Ricky.

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
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

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

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
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

thanks,
kyle

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

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

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
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

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.

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

Any suggestion?
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,
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.