Column 0 disabled but arrows show until another column is sorted
Column 0 disabled but arrows show until another column is sorted
sinesine
Posts: 4Questions: 3Answers: 0
Hi,
I'm trying to disable sorting of the first two columns in my table, however the first one (column 0) is not actually disabled straight away. When you sort another column in the table, the arrows then go away.
$(document).ready( function () {
$('#example').DataTable( {
"order": [ 0, 'desc' ],
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0, 1 ] }
]
} );
} );
Any help would be greatly appreciated.
This discussion has been closed.
Answers
Turns out that not having the default order column as 0 will help.
"order": [ 4, 'desc' ],
Works fine now.