I am using jquery datatable, I want avoid a column while sorting other columns, that is that column should remain static.
-
Can you give an example of the result of this sort?John Clifford– John Clifford2016-03-08 11:20:29 +00:00Commented Mar 8, 2016 at 11:20
-
I hope this might help. stackoverflow.com/a/4672946/4672534rmondesilva– rmondesilva2016-03-08 11:25:40 +00:00Commented Mar 8, 2016 at 11:25
-
@rmondesilva this is for disable sorting a particular column, while sorting other columns it will affect. My requirement is that column should not be change, i should remain sameuser3189828– user31898282016-03-08 11:28:32 +00:00Commented Mar 8, 2016 at 11:28
Add a comment
|
1 Answer
Use "orderFixed". Read https://datatables.net/reference/option/orderFixed
"orderFixed": [ column index, sort ];
$('#tbl').DataTable({
"orderFixed": [ 0, 'asc' ]
});
2 Comments
user3189828
it is not working. while sorting other columns the value inside fixed column also affected
rmondesilva
It works on mine. I think it's better if you will also post your codes. So we can see the problem clearly why it does not work.