ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: jplevene on April 28, 2024, 12:01:23 am
-
I have a special row (it triggers and event when it comes into view) and I always want it to be the last row, even after sorting.
I figured one way as a cheat by either saying the row is more or less than all other rows depending on the sort direction, I just need to get the current sort direction of the column.
sortType: function(rowData1, rowData2, dataIndx){
// ALWAYS make sure bottom row is at the bottom
if(is_special_row(rowData1))
return direction_up ? -1 : 1;
else
//compare rowData1[dataIndx] and rowData2[dataIndx]
}
-
I solved this another way by using lazy loading and altering "totalRecords" for each batch returned. I also passed another parameter, being my last index.
My issue is that I have results that take too long to establish how many there are, eg.I have a list of stock, I only need to list the shortages, but to go through lets say 10,000 to establish the shortages can take 5 minutes (not ideal), so I just return the number of stock as totalRecords and alter it as I know more results.
SUGGESTION: On lazy loading, the scroll bar should signify the gap afterwards as well. There should also be a timeout before the next page is loaded as if someone wants to jump to the last row, all rows between would be loaded, instead of being left blank.
-
This example shows how to exclude certain rows while sorting:
https://paramquery.com/pro/demos/freeze_rows