Reg - buttons not working
Reg - buttons not working
armaan
Posts: 19Questions: 7Answers: 1
default datatable plugin is working for me.... when i try addding buttons like excel copy the whole datatable is not working
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You are probably missing one or more button related include. Take another look at the download builder
in the starting i used only datatable it worked fine ..now i m using all the the includes provided for the button by the download builder but after rewriting to this code
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
} );
} );
datatable itself is not working
I don't see anything fundamentally wrong with that code. Please link to a test page showing the issue. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Allan
http://live.datatables.net/rezituma/1/edit
I have put the code for export to function but it doesnt show up in the table
Reference jquery.dataTables.js before dataTables.buttons.js.
http://live.datatables.net/rezituma/4/edit @tangerine i did now the datatable itself not working
You also moved jQuery. DataTables expects to find jQuery js already referenced.
The download builder might be useful to get things in the right order.
The live site is a little crap in that respect since it can insert them in the wrong order.
You also need to include the Button types for the export and any dependencies they have. Again, the download builder is the best way of doing this rather than guessing at them (heck - even I wouldn't get it right all the time and I wrote the software).
Allan
Thanks @allan & @tangerine will try both of your suggestions and come back
omg thanks @allan its working after 4 days struggling its working thanks a lot