Does anyone know how to add a checkbox in the column-filter plugin header of a jquery datatable? and when I check the checkbox, to trigger a callback (where I will 'check' all the checkboxes in the table or 'uncheck', if case)?
And no, I am not talking about this: http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html. I just need a plain old simple checkbox, not that rich-checkboxed dropdown. Something like on yahoo-mail - if you want an example.
I tried:
<script>
var oTable = $('table#table_muc').dataTable();
oTable.columnFilter({
"sPlaceHolder": "head:after",
"iFilteringDelay": 0,
"aoColumns":[
{ "type": "checkbox" },
{},
{},
{},
{},
]
});
</script>
and it is not working. The cell in the header where the checkbox was supposed to be is empty (well, contains only the header value for that column, but there is no checkbox).
In case it matters:
- jquery-version: 1.8.3
- jquery.dataTables version: 1.9.4
- jquery.dataTables.columnFilter: 1.4.5
Update: I found also this link: https://code.google.com/p/jquery-datatables-column-filter/wiki/ColumnFilter. The bad news is it says nothing about checkboxes. The good news is just like someone managed to extend it, I might be able to do less (I don't need the entire checboxed-div).