Buttons doesn't appearing
Buttons doesn't appearing

Here's the code:
$(document).ready(function () {
var table = $('#example').DataTable({
buttons: [
'copy', 'excel', 'pdf', 'print'
],
"lengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "Tudo"]],
"language": {
"url": "js/datatables_Portuguese-Brasil.json"
},
"data": testdata.data,
select:"single",
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": '',
"render": function () {
return '<i class="fa fa-plus-circle" aria-hidden="true"></i>';
},
width:"15px"
},
{ "data": "nome" },
{ "data": "cargo" },
{ "data": "linha" },
{ "data": "modelo" },
{ "data": "ativo" }
],
dom: 'Bfrtip',
"order": [[1, 'asc']]
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
In fact, only "Print" button is showing.
Sounds like you are loading all the required libraries for the other buttons. Start with the Bultin Buttons doc then click the link of each button like
excelHtml5
to see the requirements for each button.Even easier is to use the Download Builder to obtain the correct libraries for the buttons you want.
Kevin
I wasn't loading all the JS needed! Thks!