Call datatables standard sorting in custom sorting method
Call datatables standard sorting in custom sorting method
Hello people,
i have defined a custom sorting method which ignores empty cells if the
content is empty. But when there is a content i would like to call the standard datables sorting.
$('#table').dataTable( {
"aoColumnDefs": [{"bSortable": true, "sType": "nullable", "aTargets":['_all']}]
});
$.fn.dataTableExt.oSort['nullable-asc'] = function(a,b) {
if (a == '-')
return 1;
else if (b == '-')
return -1;
else
{
// call datatables standard sorting comparing "a" and "b"
}
}
thanks for your help!