DataTable Column Filter Not Working
DataTable Column Filter Not Working
AlokRanjan
Posts: 1Questions: 1Answers: 0
I am using backbone and jquery datatable.I am loading data from server side .Every thing is working fine except column filter.I am not getting any error also.
self.oTable = $('#example').dataTable({
"bDestroy": true,
"sScrollX": "965px",
"bProcessing": true,
"bServerSide": true,
"bPaginate": true,
"bLengthChange": false,
"bFilter": false,
"bInfo": true,
"sDom": 'Rlfrtip',
fnDrawCallback: function( oSettings ) {
alert( 'DataTables has redrawn the table' );
},
"aoColumns": columns,
"aoColumnDefs": [ { "sClass": "dpass", "aTargets": [ 0 ] } ],
}).columnFilter()
this.oTable.fnBuildCustomeHead();
setTimeout(function() {
var foot = $("#example").find('tfoot');
if (!foot.length) foot = $('<tfoot id="tfoot">').prependTo("#example");
$('#example thead tr ').each(function (id,text) {
$('#example thead').append(text);
});
$('#example tfoot').append("<tr></tr>");
$('#example thead tr th').each(function (id,text) {
if(id!==0)
$('#example tfoot tr').append("<th>"+text.getAttribute('aria-label').split(':')[0]+"</th>");
});
}, 5000);
Below is my html code
<table cellpadding="0" cellspacing="0" border="0" id="example">
</table>
Please help
Thanks
This discussion has been closed.