Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82616

Get the whole state of current serverside data to export

$
0
0

I have a table that loads data by ajax serverside
And I also enable export excel
the issue is how to get the current data of all the filtered/seraced rows to export ?

$('#guest_scan-products').DataTable({
lengthMenu: [
[10, 25, 50, -1],
[10, 25, 50, "All"]
],
language: language,
serverSide: true,
processing: true,
ajax: '/api/g/scan-products',
columns: productCols.filter(col => col.data !== 'cost'),
order: [
[0, 'desc']
],
dom: 'lBfrtip',
orderCellsTop: true,
fixedHeader: false,
initComplete,
buttons: [{
extend: 'excel',
titleAttr: 'Export Excel',
"oSelectorOpts": {
filter: 'applied',
order: 'current'
},
exportOptions: {
modifier: {
page: 'all'
},
format: formatExport
}
}],
});


Viewing all articles
Browse latest Browse all 82616

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>