I would disable order possibility to user after datatables is draw. I have a datatable, and I would order a data and remove possibility, for an user, to order data manually. How can I do it?
I used below code:
table = $('#tbl-1').DataTable({
"info": false,
"searching": true,
"paging": false,
"iDisplayLength": 25,
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Tutti"]],
"language": {"url": "include/it_IT.txt"},
"order": [[1,"desc"]],
//"ordering": false,
//"orderFixed": {"pre": [ 1, "desc" ]},
"fnInitComplete": function(oSettings, json) {
//alert( 'DataTables has finished its initialisation.' );
this.fnFilter("<?php echo $_POST['search'];?>");
},
}).on('init.dt', function (e, settings, data) {
wrappa(); //after custom function
});