Reputation: 1452
i am using datatables of jquery to sort the table fields.my question is how to disable sorting of all column? My code is,
$(document).ready(function () {
$('#myTable').dataTable();
});
$('#myTable').DataTable({
bFilter: false,aDataSort :false,
paging: true,
displayLength : 25
});
$('#myTable').dataTable({
"aoColumns": [
null,
null,
{ "bSortable": false },
null
]
});
Upvotes: 0
Views: 456
Reputation: 14604
Try this
$('#myTable').dataTable( {
"bSort": false
});
Or this
$('#myTable').dataTable({
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
Upvotes: 2