Prevent a row from being sorted.

Prevent a row from being sorted.

LewsTherinLewsTherin Posts: 2Questions: 1Answers: 0

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.

Answers

  • shickeyshickey Posts: 18Questions: 1Answers: 0

    You need to make a header row, like you suggested and just alter the styling to be applied to the correct row.

  • LewsTherinLewsTherin Posts: 2Questions: 1Answers: 0

    "Alter the stying"... I'm not sure I follow. Could you give me an example or further explanation?

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    @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 the tbody that is currently the only option.

    Allan

This discussion has been closed.