I have successfully gotten ColumnFilterWidgets working :
$('#datatables').DataTable({
responsive: true,
"sDom": 'W<"clear">lfrtip',
buttons: ['copy', 'csv', 'excel', 'pdf', 'print'],
searching: true,
language: {search: "_INPUT_", searchPlaceholder: "Search records",},
"ajax": {
"url": urlx,
"type": "POST",
"data": {province:province, district:district, zone:zone, school:school}
},
deferRender: true,
scrollY: 200,
scrollCollapse: true,
scroller: true,
initComplete: function () {
this.api().row( 1000 ).scrollTo();
},
"oColumnFilterWidgets": {
"aiExclude": [ 0,1,2,4,6,10,11,12,13,14,15 ]
}
});
But each time I initialize it, my Datatables buttons (CSV, Excel, PDF) disappear. When i get the buttons working, the wiltering stops working:
$('#datatables').DataTable({
responsive: true,
dom: 'Bfrtip',
buttons: ['copy', 'csv', 'excel', 'pdf', 'print'],
searching: true,
language: {search: "_INPUT_", searchPlaceholder: "Search records",},
"ajax": {
"url": urlx,
"type": "POST",
"data": {province:province, district:district, zone:zone, school:school}
},
deferRender: true,
scrollY: 200,
scrollCollapse: true,
scroller: true,
initComplete: function () {
this.api().row( 1000 ).scrollTo();
},
"oColumnFilterWidgets": {
"aiExclude": [ 0,1,2,4,6,10,11,12,13,14,15 ]
}
});
I need both the filtering of ColumnFilterWidgets and the Datatables Buttons on my application. Anyone know how to do this?