How to don't sort a separate column
How to don't sort a separate column
Hello.
If I don't want to sort for example the third column in my table, I mean - please, look at the picture --
This question has accepted answers - jump to:
This discussion has been closed.
Answers
You can use
columns.orderableto disable the users ability to sort specific columns.Kevin
Thanks! But If i have to disable the users ability to sort not only one specific columns.
Completely disable ordering can be done with
orderingI have to disable ordering only for some columns, not for all
That is precisely what Kevin has explained above.
Thanks everyone: here is an answer:
$('#table').DataTable( {
"order": [[ 4, "asc" ]],
"columnDefs": [
{ "orderable": false, "targets": 6 },
{ "orderable": false, "targets": 5 }
]
} );