Answers for "datatable disable sorting"

C#
0

jquery datatable disable sorting on specific columns

jquery datatable disable sorting on specific columns

"columnDefs": [
    { "orderable": false, "targets": 2 }
  ]

JSFiddle Here

<!--Script.js-->
$('#table').DataTable( {
"columnDefs": [
    { "orderable": false, "targets": 2 }
  ]
  });
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet"/>

<table class="table table-striped table-bordered post-list-table" id="table" >
  <thead>                      
    <tr>
      <th>Title</th>
      <th>Created At</th>
      <th>Action</th>
    </tr>
  </thead>
</table>
Posted by: Guest on August-03-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
0

how unsort the data table options

$('#example').dataTable( {
  "ordering": false
} );
Posted by: Guest on February-08-2021
0

datatable disable sorting on load

$(document).ready( function() {
    $('#example').dataTable({
        /* Disable initial sort */
        "aaSorting": []
    });
})
Posted by: Guest on June-20-2021

Code answers related to "datatable disable sorting"

C# Answers by Framework

Browse Popular Code Answers by Language