Call datatables standard sorting in custom sorting method

Call datatables standard sorting in custom sorting method

Jay1337Jay1337 Posts: 1Questions: 1Answers: 0

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!

This discussion has been closed.