Custom paging problems - first page always displayed

O

Oleg Ogurok

Hi all,

I'm having difficulties using custom pagination. In my scenario, I want to
fetch and cache 50 records while having DataGrid's PageSize = 1, i.e. I want
to show one item at a time.

I set VirtualItemCount to 380 (i.e. total number of records in database).
Then I fetch the first 50 records as DataSet and set it as the DataSource.
Then I do:

DataGrid1.CurrentPageIndex = 5; // e.g. to show the 6th page, in this case
the 6th element in the DataSet.
DataGrid1.DataBind();

However, the first page is always displayed regardless of the value of
CurrentPageIndex. As soon as I turn off EnableCustomPaging, I can see the
desired page; but now I have to implement the page calculations myself,
which is a hassle. Am I missing anything in my custom paging logic?

Thank you.
-Oleg.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top