I am using a table plugin for jQuery (datatables) and want to specify a sorcerer for sorting.
table example:
Name | email | year
My table code:
$('#table_id').dataTable({
"stateSave": true,
"aoColumnDefs": [{
'bSortable': false
}],
"oLanguage": {
"oPaginate": {
"sPrevious": "",
"sNext": ""
}
},
"iDisplayLength": 15,
"aLengthMenu": [
[15, 20, 25, -1],
[15, 20, 25, "All"]
],
"responsive": true
});
At the moment, it is sorted by customer name, yet my sql are sorted by year. How can I override this in datatable?
source
share