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

how to implement custom paging ?

1 Answer 117 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
mww
Top achievements
Rank 1
mww asked on 04 Aug 2011, 04:15 PM
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?

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 05 Aug 2011, 11:26 AM
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.

Tags
DataPager
Asked by
mww
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or