except print no other buttons are working or visible
except print no other buttons are working or visible
Below is my script
<link href="<%=request.getContextPath()%>/resources/css/rmg_style.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link type="text/css" href="https://cdn.datatables.net/2.2.4/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/tabletools/2.2.2/css/dataTables.tableTools.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/tabletools/2.2.2/css/dataTables.tableTools.css">
Below is my code
var table=$('#Project_list').dataTable({
"drawCallback": function(settings, json) {
$('.dataTables_scrollBody thead tr').css({visibility:'collapse'});
},
"initComplete": function(settings, json) {
$('.dataTables_scrollBody thead tr').css({visibility:'collapse'});
},
"scrollX" : true,
"scrollY":'45vh',
scrollCollapse: true,
"order":[[1,'desc']],
data : ResultData_rmOpenRrf,
columns : [
{title : "Action"},
{title : "RRFID"},
{title : "Flagged Date"},
{title : "Resources Pending"},
{title : "Ageing"},
{title : "Total no. Of Resources Required"},
{title : "Ticket Status"},
/* {title : "SPOC"}, */
{title : "Commitment Date"},
{title : "Revised Commitment Date"},
{title : "Skill"},
{title : "BU"},
{title : "Role"},
{title : "Band"},
{title : "Client"},
{title : "Stream"},
{title : "Project"},
{title : "Location"},
{title : "Profile Sourced"},
{title : "Source To Select"},
{title : "Reject/Hold"},
{title : "Joining Pipeline"},
{title : "Offer Pipeline"},
{title : "Selected"},
{title : "Joined"},
{title : "Offer Declined"},
]
});
var tableTools = new $.fn.dataTable.TableTools(table,{
"sSwfPath": "//cdn.datatables.net/Tabletools/2.2.2/swf/copy_csv_xls_pdf.swf"
});
$(tableTools.fnContainer()).insertBefore("#Project_list_wrapper");
Answers
TableTools was retired some time ago. Use Buttons.
https://datatables.net/extensions/buttons/
i tried using the buttons concept @tangerine, but didnt help much.. after using the buttons concept the print functionality also vanished
new $.fn.dataTable.Buttons( table, {
buttons: [
'copy', 'excel', 'pdf'
]
} );
if any one can figure out, it would be a great help to me
You need to provide more of your code. Are you referencing the necessary js files? Are you using "dom" parameters to show the buttons? Are you getting console errors?
@tangerine Now my code is working fine in Chrome.. but none of the buttons are visible in IE.... can u help me with this?? what might be the cause?? i have no console errors!!