Disable ordering on multiple header rows
Disable ordering on multiple header rows
![d1rty](https://secure.gravatar.com/avatar/2bdd3c5870a37244d7e4e5b2788e56ea/?default=https%3A%2F%2Fvanillicon.com%2F2bdd3c5870a37244d7e4e5b2788e56ea_200.png&rating=g&size=120)
Hello!
I have added a 2nd row in the table header to have column-specifc filters. With Datatables 1, ordering was only applied to th elements, but this has changed with Datatables 2 where ordering is now applied to all table data elements (td and th) in the thead.
How can I disable the ordering on that first row?
Link to test case: https://jsfiddle.net/8qecu9jL/13/
Thank you!
This question has an accepted answers - jump to answer
Answers
Add
data-dt-order="disable"
as an attribute to the row (or cell) that you don't want to be orderable (example here).And your own updated example.
It is also possible to use
orderCellsTops
, although that isn't flexible enough to allow for all eventualities, hence the need for the attribute.Allan
Thanks, that was exactly what I was looking for!