Server side processing + CSV request of all data
Server side processing + CSV request of all data
stevetauber
Posts: 2Questions: 0Answers: 0
Hi,
First let me thank you for creating and maintaining such a wonderful project. Currently, I'm running the newest version of DataTables and using Server Side processing. I need to allow for an export of all CSV data. I've read your previous response about this problem here: http://datatables.net/forums/discussion/7757/tabletools-csvexcel-to-get-whole-table-with-serverside/p1
I'm curious if there is a way to do one of the following options:
a) Use the API to extract the request that is normally made to ajax - For example, have datatables build the query string and then return it.
b) Make a request to the Server Side URL as normal but prevent the existing table from clearing itself or throwing an error if no response returns, essentially make a one way request.
Essentially what I'd love to do is resend the exact same request that was last made except append `?format=csv`.
Thanks for any insight you can provide.
First let me thank you for creating and maintaining such a wonderful project. Currently, I'm running the newest version of DataTables and using Server Side processing. I need to allow for an export of all CSV data. I've read your previous response about this problem here: http://datatables.net/forums/discussion/7757/tabletools-csvexcel-to-get-whole-table-with-serverside/p1
I'm curious if there is a way to do one of the following options:
a) Use the API to extract the request that is normally made to ajax - For example, have datatables build the query string and then return it.
b) Make a request to the Server Side URL as normal but prevent the existing table from clearing itself or throwing an error if no response returns, essentially make a one way request.
Essentially what I'd love to do is resend the exact same request that was last made except append `?format=csv`.
Thanks for any insight you can provide.
This discussion has been closed.
Replies
*edited by Allan* - It was spam - now deleted
This is actually high up on my to do list for DataTables 1.10 - an `ajax.params()` method. At the moment you would need to do something like the download plug-ins here: http://datatables.net/extras/tabletools/plug-ins .
> b) Make a request to the Server Side URL as normal but prevent the existing table from clearing itself or throwing an error if no response returns, essentially make a one way request.
Not within DataTables, but if you have the parameters (as `a` above) then you wouldn't need DataTables to make the request I guess.
Allan
@jolyon2000
> desperately in need of the ability to tack-on parameters to the server call in order to allow the server-side to do the filtering
Use `ajax.data` ( http://next.datatables.net/reference/option/ajax.data ) to send additional data to the server - not this new API method.
Allan