Sorting with absolute positioned data regardless of which column is sorted

Sorting with absolute positioned data regardless of which column is sorted

HieuHoangHieuHoang Posts: 6Questions: 3Answers: 0

Hi everyone,

I find out a link about this but it is not meet my need.
https://datatables.net/blog/2016-12-22

I want a particular row at the top regardless of which column is sorted. But I see this comment in the blog:

If you alter the sorting that is applied to the table by clicking on the headers of those columns, you will be able to see that those items stay in position regardless of the sorting of the column. If sorting is applied to one of the other columns the rows will be sorted normally.

So how can I sorting with absolute positioned data regardless of which column is sorted?
I'm creating a feature "Pin to top". If the rows is selected, it always on the top of the table. Table data is dynamic, updated using socketio.

Answers

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949

    You can use orderFixed to have the column with the absolute data to be sorted first followed by any user selected sorting.

    Kevin

Sign In or Register to comment.