Buttons default

Buttons default

skikeskike Posts: 5Questions: 3Answers: 0

Is it possible to define buttons in defaults?

This code gives an error.

$.extend(true, $.fn.dataTable.defaults, {
    dom: 'Bfrtip',
    buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
    ]
});
  
$('#example').DataTable();

http://live.datatables.net/jijirahe/1/edit

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Yes, it is possible.

    This was an issue with early versions of Buttons and your example appears to be loading Buttons 1.0.1 (although the buttons are 1.1.0).

    If you use 1.1.0 for the main file it will work: http://live.datatables.net/jijirahe/2/edit

    Allan

  • skikeskike Posts: 5Questions: 3Answers: 0

    Thank you!

This discussion has been closed.