TableTools and Server Side PipeLine
TableTools and Server Side PipeLine
alexsiagian
Posts: 5Questions: 0Answers: 0
my problem is when export, it will export shown data not all data,,
how i can export all data using server side pipe line??
need your help?
[code]
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
"fnServerData": fnDataTablesPipeline
[/code]
i'm using TableTools v2.0.1 and
DataTable v1.7.6
thx
how i can export all data using server side pipe line??
need your help?
[code]
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing.php",
"fnServerData": fnDataTablesPipeline
[/code]
i'm using TableTools v2.0.1 and
DataTable v1.7.6
thx
This discussion has been closed.
Replies
Basically the issue is that the export is being done client-side, but since you are using server-side processing not all the data is available on the client-side. So if you want all the data you have two options:
1. You can make an Ajax request to get all of the data and then export it on the client-side - this could be done with the 'ajax' button in TableTools and will likely require a few changes to your server-side script
2. You can send a request to the server to create the XLS / CSV on the server and then download it.
Allan
for the solution that you provided,
I've seen in http://www.datatables.net/extras/tabletools/button_options#ajax_options,
but what kind of file contents 'remote.php', it does the same with the file server_processing.php??
[code]
$(document).ready( function () {
$('#example').dataTable( {
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
{
"sExtends": "ajax",
"sAjaxUrl": "remote.php"
}
]
}
} );
} );
[/code]
thx
Allan