ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: entwine.llc.wi on June 25, 2022, 01:24:41 am

Title: SortType parameters
Post by: entwine.llc.wi on June 25, 2022, 01:24:41 am
What is the most efficient way to pass datatype and sort direction to the sortType function? 

These two pieces of information would be quite useful in a project I am working on.

Thanks
Title: Re: SortType parameters
Post by: paramvir on June 27, 2022, 06:17:35 am
dataType and sort direction parameters are not passed to sortType function.

However they can be obtained with this code inside the sortType callback function.

Code: [Select]
var dataType = grid.getColumn({dataIndx: dataIndx}).dataType || "string";
var dir = grid.option('sortModel').sorter.find(col=>col.dataIndx==dataIndx).dir

where grid is js grid instance of the grid.