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.
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.