Filtered data exported with table tools.
Filtered data exported with table tools.
pricejt
Posts: 12Questions: 5Answers: 1
I have seen this question asked a few times and all the answers say to use oSelectorOpts. I believe i am doing this however it doesn't appear to be working .
$(document).ready(function() {
var oTable = $('#SensorData').DataTable(
{
"order": [[2, "desc"]],
dom: 'T<"clear">lfrtip',
tableTools: {
"sSwfPath": "assets/swf/copy_csv_xls_pdf.swf"
},
"oTableTools": {
"aButtons": [
{
'sExtends': 'copy',
"oSelectorOpts": { filter: 'applied', order: 'current', page: 'all' },
},
{
'sExtends': 'xls',
"oSelectorOpts": { filter: 'applied', order: 'current' },
},
{
'sExtends': 'print',
"oSelectorOpts": { filter: 'applied', order: 'current' },
},
{
'sExtends': 'pdf',
"oSelectorOpts": { filter: 'applied', order: 'current' },
},
{
'sExtends': 'csv',
"oSelectorOpts": { filter: 'applied', order: 'current' },
}
]
},
"columnDefs": [
{
"targets": [0],
"visible": false,
"searchable": false
}
]
});
This discussion has been closed.
Answers
Finally figured this out.
Updated code