onAfterSort
fires after sorting a dataset
function onAfterSort( // template of sort-by field by: string/function/undefined, // direction of sorting dir: string/undefined, // type of sorting as: string/function): void
Example
Section titled “Example”grid.data.attachEvent("onAfterSort", function(by, dir, as){ //... some code here ...});
Details
Section titled “Details”If the third param is a function, the parameters of such a function are the following:
- a (object) - the first data item
- b (object) - the second data item
- prop(string) - the name of the field that the data have been sorted by.
grid.sort("#fieldName#", "desc", function(a, b, prop) { return a[prop] - b[prop];})
See also
Section titled “See also”Articles
API