Reset Page Index with RadDataPager

3 posts, 0 answers
  1. Andy Macourek
    Andy Macourek avatar
    10 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2010 Link to this post

    I have a RadListViewcontrol that I bind to data.  I am also using two RadDataPager controls at top and bottom.  The binding works and the paging works.  However, when I rebind the list and the pager are set to a page outside of the results, the page disappears.  I tried using fireCommand("Page", "First") and set_currentPageIndex(1) on the client before I bind, but they are not working.  They error out in the jscript that the methods do not exists.  I am using version 2010.2.929.40 of the DLLS.  I am using NeedDataSource for binding.  I cannot seem to find a server method to reset page number.
  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 20 Dec 2010 Link to this post

    Hello Andy,

    I followed your scenario in the attached demo however was not able to replicate the issue. Can you check it out and let me know what differs in your case?

    Best wishes,
    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. Jon
    Jon avatar
    36 posts
    Member since:
    Sep 2013

    Posted 22 Sep 2017 Link to this post

    I had the same situation as Andy.  Here's how I was able to reset the page index to 0.

    In the event handler that calls the Rebind method, find the RadDataPager control and set the CurrentPageIndex to 0.  Even though I had a top and bottom pager, resetting just the top caused the other to reset as well.

    protected void rsbSearch_OnSearch(object sender, SearchBoxEventArgs e)
        var RadDataPagerTop = (RadDataPager)RadListView1.FindControl("RadDataPagerTop");
        RadDataPagerTop.CurrentPageIndex = 0;
Back to Top