Datatables individual column search in server side rendering
Datatables individual column search in server side rendering
Hi, I am using datatables server side rendering , It is working fine. to access the length and start in back end i am using query.length and query.start so that values i am getting. But now i want to add individual column search, So i added the code. whenever key is up it is calling server but i dont know how to access the search value in database . This is my Individual column search code
$('#myTable tfoot th').each(function(i) {
var title = $('#myTable thead th').eq($(this).index()).text();
$(this).html('<input type="text" class="search-input-text" placeholder="Search ' + title + '" data-index="' + i + '" />');
});
table.columns().eq(0).each(function(colIdx) {
$('input', table.column(colIdx).footer()).on('keyup change', function() {
table.column(colIdx).search(this.value).draw();
});
Answers
The data sent to the server for a server-side processing request is documented here and includes details of the individual column search properties.
Allan