how to implemenent real server side pagination
how to implemenent real server side pagination
laure
Posts: 6Questions: 1Answers: 0
i need to implement a real server side pagination based on sql requets like SELECT ... LIMIT x,y
my datatable is still offering pagination capabilities (full_number) on the user interface,
but data are requested once via ajax request.
i want the data to be requested when needed.
how can i do this?
thanks four help.
This discussion has been closed.
Answers
Sounds like you want server-side processing. It will only request the data needed for each page.
Allan
hello allan,
yes. that's it. it is doing what i want.
do i need to implement sort and search on server side too?.
is it possible to mix client and server depending on what to do?
i have DataTables 1.9
Laure
Yes - that's the whole point of server-side processing. The server does the processing :-)
No. You either use DataTables in client-side processing mode, or server-side processing mode.
Documentation for old versions is available on the legacy site.
Allan
ok. i can go with that.
just another question:
i am using the full_numbers pagination.
the button next and last are sending NaN for iDisplayStart value.
i don't get why. Other buttons are working fine.
Laure
Can you link me to the page showing the problem please. That doesn't appear to be happening in the examples on this site.
Allan
sorry that's not possible. it' an intranet application.
i just set sPaginationType to full_numbers and bServerSide to true.
sAjaxSource is configured too. do i need to do something more?
thanks.
No - that should be all you need to do. I'm afraid I can't offer any more help than that without being able to see, understand and debug the problem.
Edit - I presume you have correctly implemented server-side processing on the server? Try using the debugger please.
Allan
hello allan,
i need some documentation concerning JSON data that dataTables 1.9.0 can consume from the server in serverside mode . i am still using 1.9.0 . i need to know how to return the total number of records and not only th requested data for pagination which i returned in aaData.
thanks.
Laure
The legacy documentation is currently linked from every page on this site at the top in the "Latest news" box. For legacy server-side processing, you want this page: http://legacy.datatables.net/usage/server-side
Allan