How do I hide a row whenever it has a specific constant in the data of the first column?
How do I hide a row whenever it has a specific constant in the data of the first column?
I have a very basic table:
var datatable = $('#datatable').DataTable({
responsive: true,
autoWidth: false,
pagingType: 'full',
jQueryUI: false
});
Whenever the first column contains a very specific constant string, I want that row dropped from the table. How would I do that?
Thanks...
This discussion has been closed.
Answers
Applying a search term would probably be the easiest way -
column().search()
.If you don't want it to appear in the table at all (i.e. not even in the search removed items) it would need to be removed from the table before DataTables is initialised which you could do with jQuery.
Allan