Datatables 1.10 - HTML5 "data-order" and "data-filter" attr takes no effect.

Datatables 1.10 - HTML5 "data-order" and "data-filter" attr takes no effect.

PCSPCS Posts: 2Questions: 1Answers: 0

I am building the datatable dynamically with json objects. I have few columns that have <input> and <select> HTML elements.
The global search or the sort doesn't work for these HTML elements. Hence I thought of using data-order and data-filter attributes.
In the "createdCell" callback function I add these attributes to the <td>, but sorting or searching is still not working on those columns.

Please help

Thanks

Answers

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin

    The data attributes do work but they aren't designed for use with Ajax sourced data. Rather they are for use with HTML sourced tables.

    Instead, what I would suggest you do is use columns.render as a function and return the orthogonal data for each option from there. For more information see the orthogonal data manual page.

    Allan

This discussion has been closed.