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

RadListView Paging Scroll Position

6 Answers 242 Views
ListView
This is a migrated thread and some comments may be shown as answers.
James B.
Top achievements
Rank 1
James B. asked on 01 Feb 2011, 07:32 PM
Have allowpaging true, just added some command buttons in the layout template. Problem is, when I click a bottom button, Next for example, the page scrolls back down to bottom where the button is clicked. It's in a dnn module so not sure if that has anything to do with it. On a standalone site I don't have this issue with a similar radlistview:

Any ideas how to force it to scroll to the top of the page? javascript window.scrollTo(0, 0); doesn't even do it.

How do you do the Format Code Block snippet anyway?

<div style="float: right; margin-left: 30%;">
                   <asp:Button runat="server" ID="Button1" CommandName="Page" CommandArgument="First"
                       Text="First" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                   <asp:Button runat="server" ID="Button2" CommandName="Page" CommandArgument="Prev"
                       Text="Prev" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                   <span style="vertical-align: top; position: relative; top: 4px">Page
                       <%#Container.CurrentPageIndex + 1 %>
                       of
                       <%#Container.PageCount %></span>
                   <asp:Button runat="server" ID="Button3" CommandName="Page" CommandArgument="Next"
                       Text="Next" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" />
                   <asp:Button runat="server" ID="Button4" CommandName="Page" CommandArgument="Last"
                       Text="Last" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" />
               </div>

6 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Feb 2011, 01:02 PM
Hi James,

To see more information on the requested functionality, please refer to the following article.

I hope this information helps.

Best wishes,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
James B.
Top achievements
Rank 1
answered on 07 Feb 2011, 06:57 PM
Thanks for that. I've tried some similar scripts. Because I'm in dnn and didn't want to replace the default ajax script manager, my module does not have a RadAjaxPanel, just a RadListView. Do you know what event I could do the scrolltop on? I'm just using paging buttons like above. Thanks.
0
Pavlina
Telerik team
answered on 10 Feb 2011, 02:47 PM
Hello James,

Try registering the scripts through the ScriptManager.RegisterStartupScript() method instead and see if it works as expected.

Greetings,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
James B.
Top achievements
Rank 1
answered on 10 Feb 2011, 11:10 PM
Thanks for the tips. I was successfully calling the js function but something was overriding it. I found out it is a DNN thing. On Default.aspx there is a ScrollTop hidden field that takes over. I was able to set it's value to 0 and now it's going to top:

HtmlInputHidden hdnTop = (HtmlInputHidden)this.Page.FindControl("ScrollTop");
hdnTop.Value = "0";

Some more info here:
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/postid/324156/scope/posts/Default.aspx

Appreciate the help,
James
0
Pavlina
Telerik team
answered on 15 Feb 2011, 01:17 PM
Hello James,

Thank you for your research on the matter and sharing your findings. I am sure they would be helpful for the people which are searching a similar functionality.

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Pavlina
Telerik team
answered on 15 Feb 2011, 01:17 PM
Hello James,

Thank you for your research on the matter and sharing your findings. I am sure they would be helpful for the people which are searching a similar functionality.

Regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
ListView
Asked by
James B.
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
James B.
Top achievements
Rank 1
Share this question
or