Row filtering based on column value- how?

Row filtering based on column value- how?

Samv1Samv1 Posts: 1Questions: 1Answers: 0

I'm trying to implement a custom filter for the table:

Basically, when I click a button, a custom filtering function will test the value of column #1 (numeric value) for all rows, and if the value in the column < 50 for a row, the row stays, otherwise the row is hidden.

The concept should be very simple, but I can't seem to find the right way to use the API:

  • column.filter() returns an array of column value
  • column.search() can only accept text data (not function)

What's the API that can achieve the effect?

Is there anything like the following?

var api = $('#table').DataTable();

api.column(1).data().somefilterfunction(function (val, ind) {
    return parseFloat(val) < 50;
}).draw();
This discussion has been closed.