Buttons are not visible in data table 1.10.9
Buttons are not visible in data table 1.10.9
Hello,
I just updated tabletools to buttons with new version of datatable extenstion, but i could not able to show\see buttons for xls, pdf etc.
Below are my JS,
'''assets/global/plugins/datatables/media/js/jquery.dataTables.min.js">'''
assets/global/plugins/datatables/media/js/dataTables.bootstrap.js">
assets/global/plugins/datatables/extensions/Buttons/js/dataTables.buttons.min.js">
assets/global/plugins/datatables/extensions/Buttons/js/buttons.bootstrap.min.js">
assets/global/plugins/datatables/extensions/Select/js/dataTables.select.min.js">
assets/global/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js">'''
and below are my CSS
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/global/plugins/datatables/media/css/dataTables.bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/global/plugins/datatables/extensions/Buttons/css/buttons.bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/global/plugins/datatables/extensions/Select/css/select.bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/global/plugins/datatables/extensions/ColReorder/css/colReorder.bootstrap.min.css"/>
I have initialize table with below,
var table = $('#inventoryorders_table').DataTable({
buttons: [ 'copy', 'csv', 'excel' ],
"select": {
style: 'single'
},
"colReorder": true,
});
i can see select, colreorder everything work fine, but could not see buttons,
I am using bootstrap styling.
What is wrong?
Thanks,
Answers
Can you please link to a test case showing the issue, as per the forum rules.
Thanks,
Allan
Hello Allan,
Debug code is - esupac
It looks like there is no
dom
option - which can be used to specify where the Buttons should be inserted. This is shown in the examples and also the documentation for how to display the buttons.Allan
Thanks Allan, but i went as per below documentation, as length, search, info, pagination all are visible but not buttons,
"dom - DataTables' DOM control parameter - this option is only available if you also use buttons. Additionally, if you use anything other than the DataTables default styling, you probably don't want to use this option!"
So i am using bootstrap styling, so i still need to use dom?
Thanks Allan,