How to exclude a column on individual column search?

How to exclude a column on individual column search?

noobiedevnoobiedev Posts: 3Questions: 2Answers: 0

Hello all, I am using this individual column search https://datatables.net/examples/api/multi_filter.html

From the code of this example, how can I exclude a column?

Thanks!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    The code on line 12 is doing all columns:

                this.api().columns().every( function () {
    

    Just change that to be columns you want in an array, like:

                this.api().columns([1,4,5]).every( function () {
    

    Colin

  • noobiedevnoobiedev Posts: 3Questions: 2Answers: 0

    Hey Colin, so I should put the column index inside columns() to include it?

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Yep

This discussion has been closed.