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

Datatables PDF export - How to order for fix export ?

$
0
0

Hello,

I have two button PDF.
The first to export the table (with the sorting the user want) and an other one to export data with a specific order.

The problem is : how can i order data (asc or desc) just for one button ? I don't want to export data with basic order or the user order choice but with my own order.

example : the table is order like this at the beginning :

                            >  var table = $('#example1').DataTable( {

"scrollX": true,
"responsive": false,
"order": [[0,"desc"]],
autoWidth: true,
dom: 'lf<"floatright"B>rtip',
buttons: [
{
extend: 'pdfHtml5',
text: 'PDF',
orientation: 'landscape',
title: 'Trials',
},
{
second pdf button...
}
....

Is it possible to specify in the button a special order like : "order": [[0,"desc"]], ?


Viewing all articles
Browse latest Browse all 82295

Trending Articles



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