Set PageIndex of DataPager

Posted by Barbosa on Stack Overflow See other posts from Stack Overflow or by Barbosa
Published on 2010-04-23T13:36:31Z Indexed on 2010/04/23 14:43 UTC
Read the original article Hit count: 960

Filed under:
|
|
|
|

I have a ListView that I am paging with a DataPager. I would like to set the initial page of the pager on Page_Load. I have tried the DataPager.SetPageProperties method but it's not doing what I need. Here's how I'm calling this method:

dataPager.SetPageProperties(3, dataPager.TotalRowCount, false);

The line above trims the datasource to start at the third item and paging still starts at 1. This is not what I want. I want to keep the entire list of items and just jump to a specific page in the list.

Is there another Property and/or method of a DataPager and/or ListView that I should use?

Any help will be greatly appreciated.

Thanks!

© Stack Overflow or respective owner

Related posts about datapager

Related posts about paging