Hey i am using slickgrid plugin and there i have function sortNumeric to sort data in order
function sorterNumeric(a, b) {
var x = (isNaN(a[sortcol]) || a[sortcol] === "" || a[sortcol] === null) ? -99e+10 : parseFloat(a[sortcol]);
var y = (isNaN(b[sortcol]) || b[sortcol] === "" || b[sortcol] === null) ? -99e+10 : parseFloat(b[sortcol]);
return sortdir * (x === y ? 0 : (x > y ? 1 : -1));
}
Can someone help me to extend this sorting, so null values comes always at last place.
sortdir"?-99e+10(which might be the smallest number you can imagine), one should use-Infinity