Paging Not Working with server side piping
Paging Not Working with server side piping
dfuscoii
Posts: 3Questions: 0Answers: 0
Allan, first of all congratulations for the amazing Datatables addin. This is a lot of work you went through and also constantly supporting it, it's just great.
I'm using the addin with server side piping, returning 50 records at the time with a page size of 10 records.
Here is the dev site in question:
http://cks-dev.interventioninsights.com/Search/DrugAndDiagnosis/ClinicalTrials/Clinical/doxorubicin/(Cancer%20AND%20breast)
Everything looks good and works well. You can click on the page numbers sequentially up to page number 5, then click on page 6 and see that the next batch of records is being requested from the server, and so on.
However, if you navigate up to page number 5, then click on page 7 (skipping page 6), the data displayed is actually the page 6 data. It seems for some reason the rendering starts always at the first page of the next piped batch, even though you clicked on a page that is not the first of the next batch.
I double checked my code and watched the iDisplayStart variable in my server side code. I also looked at the js pipeline function and don't see anything wrong. Maybe the problem is in the fnServerData?
Any help is appreciated.
I'm using the addin with server side piping, returning 50 records at the time with a page size of 10 records.
Here is the dev site in question:
http://cks-dev.interventioninsights.com/Search/DrugAndDiagnosis/ClinicalTrials/Clinical/doxorubicin/(Cancer%20AND%20breast)
Everything looks good and works well. You can click on the page numbers sequentially up to page number 5, then click on page 6 and see that the next batch of records is being requested from the server, and so on.
However, if you navigate up to page number 5, then click on page 7 (skipping page 6), the data displayed is actually the page 6 data. It seems for some reason the rendering starts always at the first page of the next piped batch, even though you clicked on a page that is not the first of the next batch.
I double checked my code and watched the iDisplayStart variable in my server side code. I also looked at the js pipeline function and don't see anything wrong. Maybe the problem is in the fnServerData?
Any help is appreciated.
This discussion has been closed.
Replies
Allan
If, on the other end my understanding is incorrect, that means my server code should return 51-100 when clicking on page 6, or 61-110 when clicking on page 7, and so on. If this is case, then my current server side code would be incorrect.
I have a feeling the latter might be true, but I'll wait for you to kindly confirm before making changes.
Allan