Reputation: 2354
I use this code for run DataTable on my table . This worked currently but I want run DataTable on my table with out sorting. Now my table sorted by column 0 .
How to do this?
$(document).ready(function(){
$('#myTable').DataTable();
});
Upvotes: 0
Views: 2568
Reputation: 1391
I think, you need something like this:
$(document).ready(function(){
$('#myTable').DataTable({
"bSort" :false
});
});
and if you wish to disable sorting column wise, You can use this:
$(document).ready(function(){
$('#myTable').DataTable( {
"aoColumns": [
{ "bSortable": false },
null,
null,
null
]
});
});
Upvotes: 3