Why dont work buttons and multitables?
Why dont work buttons and multitables?
Ruiz86
Posts: 2Questions: 1Answers: 0
My table in one tab (3 tabs, each tab have one table):
<table id="" class="table table-striped table-sm display">
<thead class="thead">
<tr>
<th>Nº factura</th>
<th>Fecha</th>
<th>Destinatario</th>
<th>Base Imp.</th>
<th>IVA</th>
<th>Importe IVA</th>
</tr>
</thead>
<tbody>
<tr>
<th>1111</th>
<th>12/03/2019</th>
<th>Juan</th>
<th>83</th>
<th>21</th>
<th>20</th>
</tr>
...
</tbody>
</table>
Script:
<script>
$(document).ready(function() {
$('table.display').DataTable( {
order: [ 1, 'asc' ],
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
} );
} );
</script>
Where is the problem?
This discussion has been closed.
Answers
There isn't enough info to help. What exactly happens?
Assuming the problem is the buttons don't appear then first make sure you are loading the proper buttons JS and CSS files. Use the Download Builder to obtain the files.
If this doesn't help then please post a link to your page or a test case replicating the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
The buttons not appears, but rest yes (pagination, search...) all work but not buttons.
I have the cnd installed and nothing, its strange.
Its hard to say without seeing the issue. Can you post a link replicating the issue?
See if you have errors in the browser's console.
Kevin