Answers for "datatable no order by default"

-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
-1

datatable change default sorting

Javascript12345$(document).ready(function() {    $('#example').DataTable( {        order: [[ 3, 'desc' ], [ 0, 'asc' ]]    } );} );
Posted by: Guest on August-29-2021

Browse Popular Code Answers by Language