I want to prevent by default sorting in data table.
Below is the code I am using.
$('#tableId').dataTable( {
"bPaginate": true,
"stateSave": true
});
Have you tried using this: columns.orderable ?
$('#tableId').dataTable( {
"bPaginate": true,
"stateSave": true,
"columnDefs": [{ "orderable": false, "targets": '_all' }]
});
$('#tableId').dataTable( {
"bPaginate": true,
"columnDefs": [{ "orderable": false, "targets": '_all' }]
});
Actually it save the state of previous one, after removing state save property its working fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.