how to implement custom paging ?

2 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 04 Aug 2011 Link to this post

    I have a RadListView and a RadDataPager.  Ive managed to set it up using standard paging but I want to use custom paging.
    In standard mode, whenever I select the 'next' button, it pages the ListView, but then freezes.

    I cant see how I would implement my own custom paging.

    Im retrieving a list ob objects using LINQ
    I pass in the current page and the pagsize, and use 'skip' in the LINQ command


    protected void RadListView1_NeedDataSource(object sender, Telerik.Web.UI.RadListViewNeedDataSourceEventArgs e)
            {
                List<Business.Logic.BusinessObjects.AssociationRequest> lst = new List<Business.Logic.BusinessObjects.AssociationRequest>();
                lst = requestManager.GetArtistRequests(this.CurrentArtistID, false, this.CurrentPage, this.PageSize);
                 
                     
                if (lst.Count > 0)
                {
                    this.RadListView1.DataSource = lst;
                }
                else
                {
                    if (RadListView1.DataSourceID == "")
                    {
                        RadListView1.DataSource = new string[] { };
                    }
                }
                 
            }

    I want to set the current page whenever I select 'next' or a page number from the datapager, how can this be done?
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 05 Aug 2011 Link to this post

    Hi Mww,

    You could see example implementation of custom paging for the RadListView in this online demo:
    http://demos.telerik.com/aspnet-ajax/listview/examples/paging/custompaging/defaultcs.aspx
    I hope this helps.

    Regards,
    Vasil
    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
Back to Top