Pagination buttons not working correctly with Ajax results
Pagination buttons not working correctly with Ajax results
ocramot
Posts: 3Questions: 0Answers: 0
Hi,
I tried to fill a dataTable using the server-side pipeline method, as described in http://datatables.net/examples/server_side/pipeline.html , and I'm retrieving results from Ajax.
However, even though I'm getting the correct results, the pagination buttons on the lower right corner are not working. In default mode, "Previous" and "Next" buttons do nothing, thus I set the "sPaginationType" parameter to "full_numbers". "Previous" and "Next" keep doing nothing, but I can see the page numbers, and they are working... unfortuately, they are infinite.
For example, if I have 43 results returned, and I can see 10 results per page, I will see the first 4 pages with 10 results, the fifth page with 3 results, and then I could click on a nonexistent sixth page, which will show the results of the first page... and so on.
The "First" button is working, and I suppose "Last" is working as well... well, it would work if the results list had an end.
Am I missing to set some parameters? Do I have to add some other checks in the functions? The dataTables debugger ID is ixofuk (http://debug.datatables.net/ixofuk).
Thanks in advance for your help
I tried to fill a dataTable using the server-side pipeline method, as described in http://datatables.net/examples/server_side/pipeline.html , and I'm retrieving results from Ajax.
However, even though I'm getting the correct results, the pagination buttons on the lower right corner are not working. In default mode, "Previous" and "Next" buttons do nothing, thus I set the "sPaginationType" parameter to "full_numbers". "Previous" and "Next" keep doing nothing, but I can see the page numbers, and they are working... unfortuately, they are infinite.
For example, if I have 43 results returned, and I can see 10 results per page, I will see the first 4 pages with 10 results, the fifth page with 3 results, and then I could click on a nonexistent sixth page, which will show the results of the first page... and so on.
The "First" button is working, and I suppose "Last" is working as well... well, it would work if the results list had an end.
Am I missing to set some parameters? Do I have to add some other checks in the functions? The dataTables debugger ID is ixofuk (http://debug.datatables.net/ixofuk).
Thanks in advance for your help
This discussion has been closed.