How can I search multiple columns in DataTables?

You can override the built in search / filter with a custom filter : $(‘.dataTables_filter input’).unbind().on(‘keyup’, function() { var searchTerm = this.value.toLowerCase(); $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) { //search only in column 1 and 2 if (~data[0].toLowerCase().indexOf(searchTerm)) return true; if (~data[1].toLowerCase().indexOf(searchTerm)) return true; return false; }) table.draw(); $.fn.dataTable.ext.search.pop(); }) By this the “normal search” only applies to … Read more

How to submit checkboxes from all pages with jQuery DataTables

CAUSE jQuery DataTables removes non-visible rows from DOM for performance reasons. When form is submitted, only data for visible checkboxes is sent to the server. SOLUTION 1. Submit form You need to turn elements <input type=”checkbox”> that are checked and don’t exist in DOM into <input type=”hidden”> upon form submission. var table = $(‘#example’).DataTable({ // … Read more