Answers for "DataTable diasble default sorting"

-1

orderable false in datatable

$('#example').DataTable( {
  columnDefs: [
    { orderable: false, targets: 0 }
  ]
} );

reference: 
https://datatables.net/reference/option/columns.orderable
Posted by: Guest on January-29-2021
0

sorting disable in datatable bootstrap

$('#id-of-my-table').DataTable({
    "columnDefs": [
        { "orderable": false, "targets": [0, 4, 5, 6] },
        { "orderable": true, "targets": [1, 2, 3] }
    ]
});
Posted by: Guest on August-09-2021

Browse Popular Code Answers by Language