Buttons aren't showing in the datatable.

Buttons aren't showing in the datatable.

teamvoyteamvoy Posts: 1Questions: 1Answers: 0
edited August 2016 in Free community support

Hi guys, have a problem with datatable extensions. Could u help me with it?

I am using Button extension for downloading table data in excel format. I have the following snippet of code and button for download file just doesn't appear at all. Do u have any suggestions what is going wrong? Maybe I made some mistakes in initializing? Thank you for any reply and thoughts.

var suppliersAdminDataTable = {
init: function () {
var table = $('#admin_suppliers').DataTable({
buttons: ['excel'],
sPaginationType: 'numbers',
aaSorting: [0, 'asc'],
bProcessing: true,
bServerSide: true,
sAjaxSource: $('#admin_suppliers').data('source'),
pages: 10,
initComplete: function () {
table.buttons().container().appendTo('#admin_suppliers .col-sm-6:eq(0)');
},
drawCallback: function () {
loadEditable('js-edit-supplier', 'statuses');
loadEditable('js-edit-supplier', 'memberships');
}
});
}
}

Answers

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

This discussion has been closed.