How to search columns on a value that I update?
How to search columns on a value that I update?
![rachelf99](https://secure.gravatar.com/avatar/666abee0501d38be7d3467e9b04d9ed0/?default=https%3A%2F%2Fvanillicon.com%2F666abee0501d38be7d3467e9b04d9ed0_200.png&rating=g&size=120)
var table = $('#experimentTab').DataTable{
"initComplete": function(){
// In that function I update some values of the datatables
var rows = table.rows().data();
rows.each(function (index) {
// update the status for each rows
}
table.rows().data(rows).draw();
}
});
$('#data_search').submit(function(e) {
e.preventDefault();
var status = $('#status').val();
table.search('').columns().search('').draw();
table.column(1).search().draw();
}
However, my problem is that the 'search' dosen't work. The search results are still same as those before updates. I console out the Datatables's data, It changes indeed. What should I do to search columns?
This question has an accepted answers - jump to answer
Answers
I tried something similar here: https://live.datatables.net/jifamevo/1/edit and that's working as expected - searching for 'Wordsmith' afterwards does show the expected value.
Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Colin