ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on November 20, 2018, 09:56:09 am
-
Hello Team,
Our requirement is to show some more columns in the pivot mode.
So how to add columns in the pivot mode for show. In hide Cols menu also some columns are not showing. In normal mode we are able to show and hide columns.
For Example we have one department column but we are not able to see that column in the pivot mode. We created plnkr for your understanding. Refresh if not load properly.
Plnkr URL:
https://next.plnkr.co/edit/Zzj3Z2PtGO9am8A3
Please give your valuable suggestion.
-
Pivot mode has different columns ( colModel ) than original columns ( colModel ) and it retains only the relevant columns from original view.
Retaining other columns don't make sense in the pivot view context.
pivotCM event can be used to add custom columns in the pivot view.
pivotCM: function(evt, ui) {
ui.CM.push(collM[2]);
}
https://next.plnkr.co/edit/ZPx1bbU5tlnPWfY5
-
Hello Team,
Thanks for your valuable solution.
According to your suggestion we are able to show the department column. But seems data is not showing for the department column plnkr shared by you.
I tried to get data using :
var data = $('#grid_Pivot').pqGrid('option','dataModel.data');
In dataModel also data is not showing for Department column.
Please suggest further.
-
pivot uses the data from row group by, column group by and aggregate columns and transforms to summarize it.
Any other column data doesn't make any sense in the pivot context.
If you need to include data from Department or any other column, then you have to include it in row group by or column group by columns.
-
Hello Team,
Thanks for your feedback.
But according to our requirement, we need data for some more fields without adding fields in the row or column groups.
Please suggest any other option to add or achieve this.
-
Please recheck https://next.plnkr.co/edit/ZPx1bbU5tlnPWfY5
I've added some random values in Department column.