RadListView Paging Scroll Position

7 posts, 0 answers
  1. James B.
    James B. avatar
    24 posts
    Member since:
    Jan 2011

    Posted 01 Feb 2011 Link to this post

    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>

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 07 Feb 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. James B.
    James B. avatar
    24 posts
    Member since:
    Jan 2011

    Posted 07 Feb 2011 Link to this post

    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.
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 10 Feb 2011 Link to this post

    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.
  6. James B.
    James B. avatar
    24 posts
    Member since:
    Jan 2011

    Posted 10 Feb 2011 Link to this post

    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
  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 15 Feb 2011 Link to this post

    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.
  8. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 15 Feb 2011 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017