How to use column().search() for non-empty records?

How to use column().search() for non-empty records?

rdmrdm Posts: 192Questions: 54Answers: 4

I've used the code example on https://datatables.net/reference/api/columns().search()#Examples to filter a specific column by a specific string, but I've been asked to add a toggle search that filters out all column(7) records with no value. (i.e., nothing was entered in that field). How would I go about doing that "where not null or empty" column search?

Answers

  • colincolin Posts: 15,091Questions: 1Answers: 2,580

    For complex searches with multiple options, it would be worth looking at SearchPanes or SearchBuilder . Both of those are designed to cater for that. Without those, you would need to apply a regex to the search - please see example here,

    Colin

Sign In or Register to comment.