ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: MarquisMark9 on February 28, 2017, 12:54:10 am
-
We have a number of columns which use drop downs. The drop downs have display text which is a string and a value which is an int. When the header is clicked to sort the column, it seems to be sorting by the int value, not the display text. Is there a way to sort the column by its display text instead of the underlying value?
-
Default sorting can be replaced by custom sorting with help of column.sortType callback.
Assuming you save the displayed text values in the rowData with "prop" keynames.
sortType: function( rowData1, rowData2 ) {
var val1 = rowData1.prop || "",
val2 = rowData2.prop || "";
return val1.localeCompare(val2);
},