Hello Everyone,
I want to change the column sorting based upon the column name. I Do not want to hard code the value for targets like 2 or 3...
$(document).ready(function () {
$('.datatable_tri').dataTable({
'columnDefs': [ { 'type': 'file-size', 'targets': 1 } ],
'aaSorting': [],
'iDisplayLength': 50
});
});
I also tried using
'columnDefs': [ { 'type': 'file-size', 'title': 'SIZE' } ]
, but ut does'nt work.
PS : SIZE the column header
Here is a fiddle --> http://jsfiddle.net/v07uxf35/3/