Dynamically adding data-search attributes during initialization to enable filtering or global search
Dynamically adding data-search attributes during initialization to enable filtering or global search
vishalashah
Posts: 3Questions: 2Answers: 0
Is it possible to add data-search attributes to the cell during datatables initialization when supplying json data using Ajax?
I'm able to use createdCell option while supplying the column definitions, however, this does not get picked by the global search.
This discussion has been closed.
Answers
having this exact issue. loading data via ajax.
one column is html and is not properly sorting. tried adding data-search. did not work.
I had the same issue and could eventually work it out, using the columns.render property. See https://datatables.net/reference/option/columns.render and especially the 2nd example there.