Note that there are some explanatory texts on larger screens.

plurals
  1. POselect-all checkbox in a jquery data table with column filter
    text
    copied!<p>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)?</p> <p>And no, I am not talking about this: <a href="http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html" rel="nofollow">http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html</a>. I just need a plain old simple checkbox, not that rich-checkboxed dropdown. Something like on yahoo-mail - if you want an example.</p> <p>I tried:</p> <pre><code>&lt;script&gt; var oTable = $('table#table_muc').dataTable(); oTable.columnFilter({ "sPlaceHolder": "head:after", "iFilteringDelay": 0, "aoColumns":[ { "type": "checkbox" }, {}, {}, {}, {}, ] }); &lt;/script&gt; </code></pre> <p>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).</p> <p>In case it matters:</p> <ul> <li>jquery-version: 1.8.3</li> <li>jquery.dataTables version: 1.9.4</li> <li>jquery.dataTables.columnFilter: 1.4.5</li> </ul> <p><strong>Update</strong>: I found also this link: <a href="https://code.google.com/p/jquery-datatables-column-filter/wiki/ColumnFilter" rel="nofollow">https://code.google.com/p/jquery-datatables-column-filter/wiki/ColumnFilter</a>. 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).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload