Datatable with both excel button and lengthMenu

Datatable with both excel button and lengthMenu

Per77Per77 Posts: 16Questions: 7Answers: 0

Hello all,
I need your help! How do I combine these two? I can not get it to work!

Please help!
Per

$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
} );
} );

$(document).ready(function() {
$('#example').DataTable( {
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
} );
} );

Answers

This discussion has been closed.