Index Column Export To PDF

Index Column Export To PDF

amundeadamundead Posts: 2Questions: 1Answers: 0

I have a working code to export all data on table to pdf. But problem is, index column not display when export to pdf.

Answers

  • amundeadamundead Posts: 2Questions: 1Answers: 0
    edited December 2015
    $(document).ready(function() { var t = $('#table1').DataTable( { dom: 'Bfrtip', buttons: [ { extend: 'pdfHtml5', titleAttr: 'PDF', text: '', orientation: 'landscape', download: 'open', pageSize: 'LEGAL', title: 'Laporan Pengguna Aktif Sistem Pegerakan Staf Bahagian Pengurusan Maklumat: <?php echo date('F Y'); ?>', message: 'Laporan Pengguna Aktif Sistem Pegerakan Staf Bahagian Pengurusan Maklumat', exportOptions: { columns: ':visible' } } ], "columnDefs": [ { "searchable": false, "orderable": false, "targets": 0 } ], "order": [[ 1, 'asc' ]] } ); t.on( 'order.dt search.dt', function () { t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) { cell.innerHTML = i+1; } ); } ).draw(); } );
This discussion has been closed.