If you want, search by column in your DataTable, you should an structure with the column "state" for example:
<table id="example" class="display DataTable" cellspacing="0" width="100%">
<thead>
<tr><th>Name</th><th>Position</th><th>Office</th><th>Age</th><th>Start date</th><th>State</th></tr>
</thead>
<tbody>
<tr><td>Lael Greer</td><td>Systems Administrator</td><td>London</td><td>21</td><td>2009/02/27</td><td>COMPLETE</td></tr>
<tr><td>Jonas Alexander</td><td>Developer</td><td>San Francisco</td><td>30</td><td>2010/07/14</td><td>INCOMPLETE</td></tr>
<tr><td>Shad Decker</td><td>Regional Director</td><td>Edinburgh</td><td>51</td><td>2008/11/13</td><td>INCOMPLETE</td></tr>
<tr><td>Michael Bruce</td><td>Javascript Developer</td><td>Singapore</td><td>29</td><td>2011/06/27</td><td>COMPLETE</td></tr>
</tbody>
</table>
and one CheckBox for populate the table for state:
<input type="checkbox" id="myCheckbox" /> Show Complete Orders
DataTables have a columns().search() function to search value for columns (search( input , regex, smart , caseInsen )):
$(document).ready(function() {
var oTable = $('#example').DataTable();
$("#myCheckbox").on("change",function(){
if($(this).is(":checked")){
oTable
.columns(5)
.search("^" + "COMPLETE" + "$", true, false, true)
.draw();
}else{
oTable
.columns(5)
.search("")
.draw();
}
});
});
Result: https://jsfiddle.net/cmedina/7kfmyw6x/67/