ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: 徐雪峰 on July 24, 2020, 05:09:02 pm
-
i have a data array like the under code:
day, year, brand, sale
'day1',2019,'A1',1000
'day1',2020,'A1' ,2000
'day2',2019,'A2',3000
'day2',2020,'A2',4000
'day1',2019','日合计',4000
'day2','2020','日合计',6000
when my groupcols is brand,year,i want the '日合计' groupcol is at the last.
what should i do?
-
how to sort the pivot columns,or how to set a pivot column to the last position?
-
You need to define colModel and use pivotSortFn on the column bound to '日合计' data to sort the group cols.
https://paramquery.com/pro/api#option-column-pivotSortFn
-
I still don't understand the api's paramater. i think i don't know how to use it.
I change the collumn name to let the '日合計' displayed at the last column.