fires before sorting of the dataset
| by |
| boolean | returning false will prevent sorting |
view.data.attachEvent("onBeforeSort", function(by, dir, as){
//... some code here ...
});
Returning false from the event handler will block further processing, and data will not be sorted.
If the third param is a function, the parameters of such a function are the following:
table.sort("#fieldName#", "desc", function(a, b, prop) {
return a[prop] - b[prop];
})