Button (export to excel/PDF) does not display
Button (export to excel/PDF) does not display
Link to test case: https://jsfiddle.net/ykbrp4sm/3/
Debugger code (debug.datatables.net):
$( document ).ready(function() {
var table = $('#gvTranslations').DataTable({
select: {
info: false,
style: 'single'
},
autoWidth: true,
buttons: ['pdfHtml5'], //tried many variations for example ['copy', 'excel', 'pdf' ],
stateSave: true
});
table.on('select', function (e, dt, type, indexes) {
if (type === 'row') {
table[type](indexes).nodes().to$().addClass('table-primary');
}
});
table.on('deselect', function (e, dt, type, indexes) {
if (type === 'row') {
table[type](indexes).nodes().to$().removeClass('table-primary');
}
});
});
Error messages shown: None
Description of problem: Table display correctly, but with no button (i tried many variation) is displayed.
The library is generated with automatic tool here the header of the minified file generated :
_> /*
- This combined file was created by the DataTables downloader builder:
- https://datatables.net/download
- To rebuild or modify this file with the latest versions of the included
- software please visit:
- https://datatables.net/download/#bs5/jszip-2.5.0/pdfmake-0.1.36/dt-1.11.5/af-2.3.7/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/date-1.1.2/fc-4.0.2/fh-3.2.2/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sb-1.3.2/sp-2.0.0/sl-1.3.4/sr-1.1.0
- Included libraries:
- JSZip 2.5.0, pdfmake 0.1.36, DataTables 1.11.5, AutoFill 2.3.7, Buttons 2.2.2, Column visibility 2.2.2, HTML5 export 2.2.2, Print view 2.2.2, ColReorder 1.5.5, DateTime 1.1.2, FixedColumns 4.0.2, FixedHeader 3.2.2, KeyTable 2.6.4, Responsive 2.2.9, RowGroup 1.1.4, RowReorder 1.2.8, Scroller 2.0.5, SearchBuilder 1.3.2, SearchPanes 2.0.0, Select 1.3.4, StateRestore 1.1.0
*//*!_
This question has an accepted answers - jump to answer
Answers
Turn out i miss this part : dom: 'Bfrtip' in table initialization