TableTools copying all rows not just filtered
TableTools copying all rows not just filtered
bsawyer
Posts: 2Questions: 0Answers: 0
I am trying to setup the datatable so when I filter the data using the search box I can copy the filtered results. The table will filter as it is supposed to but when I copy or save it copies all rows including those that don't match the filter.
Any guidance would be appreciated.
This is my initiation code.
[code]
$('#procedure_list').dataTable({
"bLengthChange": true,
"iDisplayLength": 10,
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "assets/plugins/data-tables/extras/tabletools/swf/copy_csv_xls.swf",
"aButtons": [ "copy", "csv" ]
},
"aoColumnDefs": [
{ "sType": "string", "aTargets": [ 0 ] }
],
"aaSorting": [[ 0, "desc" ]]
});
[/code]
Any guidance would be appreciated.
This is my initiation code.
[code]
$('#procedure_list').dataTable({
"bLengthChange": true,
"iDisplayLength": 10,
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "assets/plugins/data-tables/extras/tabletools/swf/copy_csv_xls.swf",
"aButtons": [ "copy", "csv" ]
},
"aoColumnDefs": [
{ "sType": "string", "aTargets": [ 0 ] }
],
"aaSorting": [[ 0, "desc" ]]
});
[/code]
This discussion has been closed.
Replies
Allan
It doesn't seem to be an option in the latest version. How can I only export filtered rows?
I agree.. any other side solution? I am just try to find a way to do it.. no luck yet
Ooops - it is there in the code, just not in the documentation... I'll correct that just now, but for the moment, use the legacy documentation: http://legacy.datatables.net/extras/tabletools/button_options#oSelectorOpts .
Allan
Using oSelectorOpts does not work for me. Still esporting all rows
Doesn't work for me either when exporting to pdf. For clipboard, csv and xls export it works. I'm using this configuration:
Here are the oSelectorOpts possible options:
http://datatables.net/docs/DataTables/1.9.4/#$