Login Register

Suggestion: Allow to sub sort a column programmatically

It would be nice to have in the compare function a refernce to the row numbers.

Instead of:

model.fields.get(0).compare = function(a, b){
return (b > a ? 1 : (a == b ? 0 : -1));
}

Maybe something like:

model.fields.get(0).compare = function(a, b, aRow, bRow){
return (b > a ? 1 : (a == b ? { ... sub sort logic ... } : -1));
}

This way, when sorting by column 0 (for example) I could programmatically do a sub sort by any other column.