how to remove sorting option from datatables

 $(document).ready(function() {

    $('#example').DataTable( {
      "aoColumnDefs": [
          { 'bSortable': false, 'aTargets': [ 0 ] }
       ]
      
  });

});
 $(document).ready(function() {

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

});

Leave a Reply