column search an array?

column search an array?

ale1981ale1981 Posts: 3Questions: 1Answers: 0

I am having problems trying to search / filter a column by an array.

what I am trying to do;

dTable.column(0).search( [1,9] ).draw()

what I would like is to filter column 0 if the column value exists in the array, is this possible?

Answers

  • ale1981ale1981 Posts: 3Questions: 1Answers: 0

    I have also tried the filter route and managed to get the filtered data but am unsure on how to apply the filter?

                var filtered = dTable.column( 0 ).data().filter( function(value, index) {
                    return $.inArray(parseFloat(value), statusArray) == -1 ? false : true;
                })
    
  • ale1981ale1981 Posts: 3Questions: 1Answers: 0

    Anybody know how I can apply this filter to my table?

This discussion has been closed.