How can I create a separate link to sort dat in columns
How can I create a separate link to sort dat in columns
$('#jobs').dataTable({'sPaginationType': 'full_numbers',
'aaData': <?php echo html_entity_decode(json_encode($pageArr)) ?>,
'iDisplayLength':5 ,
"bAutoWidth": false,
"aaSorting": [[ 0, "desc" ]],
"aoColumns": [ null,{"bVisible":false},{"bVisible":false}]
});
I am hiding second and third columns of table but want a sort against them , How can I make a separate link to sort by them ...
'aaData': <?php echo html_entity_decode(json_encode($pageArr)) ?>,
'iDisplayLength':5 ,
"bAutoWidth": false,
"aaSorting": [[ 0, "desc" ]],
"aoColumns": [ null,{"bVisible":false},{"bVisible":false}]
});
I am hiding second and third columns of table but want a sort against them , How can I make a separate link to sort by them ...
This discussion has been closed.
Replies
Allan
var oDataTable=$('#jobs').dataTable();
oDataTable.fnSort( [[2,"desc"]]); // call the sort
$('#jobs td').addClass('sorting_1');
But how can I add this code for paging button, as well as select change [10/20/....]
$('#jobs td').addClass('sorting_1