Prevent a row from being sorted.
Prevent a row from being sorted.
LewsTherin
Posts: 2Questions: 1Answers: 0
in DataTables
In my table, I have my headers, and right under the headers I have a dropdown box where a user can add items to the table.
How would I go about not having this sorted when clicking headers? If I put this in <thead>, the sorter arrows get applied to this row instead of the header row.
This discussion has been closed.
Answers
You need to make a header row, like you suggested and just alter the styling to be applied to the correct row.
"Alter the stying"... I'm not sure I follow. Could you give me an example or further explanation?
@shickey is correct - rows in the
tbody
are all sorted equally. There are no exceptions in DataTables. You can manually insert a row after a draw, which is what I do in the row grouping example, but if you need a static row in thetbody
that is currently the only option.Allan