Error with Pagination when setting iDisplayLength
Error with Pagination when setting iDisplayLength
fasted004
Posts: 3Questions: 0Answers: 0
I am using server side processing and running into a problem when I try to specify iDisplayLength...
assuming iDisplayLength=25
using the 2 button paging system the initial request for the first 25 entries works as expected...
The entries returned are 1 to 25
The info says: "Showing 1 to 25 of 23,468 entries"
however clicking the next button results in the following...
The entries returned are 25 to 50
The info says: "Showing 0251 to 2,525 of 23,468 entries"
clicking next one more time...
The entries returned are 2525 to 2550
The info says: "Showing 025,251 to 23,468 of 23,468"
Because my number of entries is 23,468 the next button is now disabled
So it appears that the range info is not getting updated properly, and from what I have read on the server-side processing it appears that the javascript handles this and the developer does not have to control it.
Other potentially useful information
- pagination works fine when iDisplayLength is not specified in the javascript
- pagination works fine if the user changes the display length using the drop down menu
- pagination even works fine if the user first selects a different page length, then returns the page length to 25
Loving DataTables it is clean and simple thanks for all the great work.
assuming iDisplayLength=25
using the 2 button paging system the initial request for the first 25 entries works as expected...
The entries returned are 1 to 25
The info says: "Showing 1 to 25 of 23,468 entries"
however clicking the next button results in the following...
The entries returned are 25 to 50
The info says: "Showing 0251 to 2,525 of 23,468 entries"
clicking next one more time...
The entries returned are 2525 to 2550
The info says: "Showing 025,251 to 23,468 of 23,468"
Because my number of entries is 23,468 the next button is now disabled
So it appears that the range info is not getting updated properly, and from what I have read on the server-side processing it appears that the javascript handles this and the developer does not have to control it.
Other potentially useful information
- pagination works fine when iDisplayLength is not specified in the javascript
- pagination works fine if the user changes the display length using the drop down menu
- pagination even works fine if the user first selects a different page length, then returns the page length to 25
Loving DataTables it is clean and simple thanks for all the great work.
This discussion has been closed.
Replies
i was using "iDisplayLength": "25"
just removed the quotes
"iDisplayLength": 25
Allan