November Happy Hour will be moved to Thursday December 5th.

Paging suggestions

Vote:
 

Hi!

I'm looking for a good/easy way to implement paging using a repeater... I know there's an easy way of doing this using the EPiServer PageList but I'm using some filtering and stuff in code behind which made me turn to a repeater instead. Any suggestions are welcome...

#79454
Dec 17, 2013 16:59
Vote:
 

Well, it's quite easy to just filter the collection with Linq:

PageDataCollection pages = this.GetPages();

var page = Request["page"].ToInt(1) - 1;
var pageSize = 10;

this.PagesRepeater.DataSource = pages.Skip(page * pageSize).Take(pageSize);
this.PagesRepeater.DataBind();

    

#79652
Edited, Dec 27, 2013 4:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.