SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onSorting  event

It will be fired just before changing the sorting state of columns by clicking column header. 

If explicitly call Boolean false within this event handler, sorting will not be proceeded. It will not be fired when directly call orderBy

After normally changing the sorting state, onSorted event will be fired. 

Code -1
    grid.onSorting = function (grid, column) {
        if (!$('#sorting').is(':checked')) {
            return false;
        }
    }
See Also
onSorted
orderBy
orderByFields
Examples
Column Sorting