The variable pui.gridSort can be used customize the client side grid column sort by defining a sort function.
The following parameters are passed to this function:
- value1 = first field value to compare
- value2 = second field value to compare
- fieldName = (version 5.6.0 and newer) name of the field that the grid is sorted by
- isDescending = (version 5.6.0 and newer) true if sorting in descending sequence, false otherwise
Example:
Code Block |
---|
pui.gridSort = function(value1, value2, fieldName, isDescending) { if (value1 > value2) return -1; else return 1; } |
...