If I get you right, do you want to use your own istead implementation to load all the data, and then using the PagedDataSource right?
If so, you should make sure that QueryGoesHere is Queryable supporting this (Linq2Sql or EF). Then you should get an account of your date like this
var count = QueryGoesHere.Count();
and get the part of the data you want to display:
var skip = (curPageNumber - 1)*itemsPerPage; var display = Math.Min(count - skip, itemsPerPage);
and just use
var displayedItems = QueryGoesHere.Skip(skip).Take(display).ToArray();
That should do the trick.
source share