copy_csv functionality for table data
copy_csv functionality for table data
I am using div inside that I have to datatables. For the lower datatable I want copy csv pdf buttons. If I dont apply the code for this things work fine, but as I apply the code for this it gives an error while running . While loading copy csv pdf buttons appear but as the full page loads they disappears the table which was coming properly earlier shrinks and it throws error if inspect the page "Uncaught TypeError: Cannot read property 'sWidth' of undefined" for jquery.dataTable.min.js
$(document).ready(function () {
$("#clientDeptResultTable").dataTable({
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
iDisplayLength: 25,
"sPaginationType": "full_numbers",
"bJQueryUI": false,
"sDom": '<"H"Tlfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
"copy", "xls", "pdf","print"
],
"sSwfPath": "/clientsiteaccess/ext/jquery/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"aoColumns": [
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] }
]
});
});
Can anyone help in resolving this issue ?
Thanks
$(document).ready(function () {
$("#clientDeptResultTable").dataTable({
"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
iDisplayLength: 25,
"sPaginationType": "full_numbers",
"bJQueryUI": false,
"sDom": '<"H"Tlfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
"copy", "xls", "pdf","print"
],
"sSwfPath": "/clientsiteaccess/ext/jquery/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
},
"aoColumns": [
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] },
{ "asSorting": [ "asc" ,"desc" ] }
]
});
});
Can anyone help in resolving this issue ?
Thanks
This discussion has been closed.
Replies