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?

R_GR_G Posts: 31Questions: 10Answers: 0

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...

Answers

  • allanallan Posts: 63,234Questions: 1Answers: 10,417 Site admin

    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

This discussion has been closed.