In ag-grid I'm trying to use column grouping in pivot mode.
E.g. In the plunker in the below link, a 'sum(Total)' column is displayed after setting gridOptions.pivotColumnGroupTotals = 'before'. Instead of this I would want the 'Gold' column to be displayed by default, and when the column group is expanded 'Silver' and 'Bronze' columns should be displayed along with 'Gold' column.
https://www.ag-grid.com/javascript-grid-pivoting/#pivotColumnGroupTotals
ag-grid has an option to achieve this in non-pivot grids using the column property 'columnGroupShow' as in below link. But not sure how to achieve the same in pivot grids.
https://www.ag-grid.com/javascript-grid-grouping-headers/
Appreciate any help!
Related
Is it possible to change the order of a column that's used for row grouping?
e.g.
Country, Account , total
Group rows by Country but display like this:
Account, Total, Country
This can be done manually after the grid is rendered but cannot find a way to render it with this ordering.
I couldn't find an option to order this column to the end of the grid since this column is auto generated by AG-Grid
many thanks
Rob
I use ag-grid enterprise edition and I would to add total columns in pivot mode. It is very clear in document how to do so but not in server-side rendering. The idea is that the back-end calculate the total of values for each row and I want to show it in the grid.
I tried a workaround using custom row groups and adding new columns to columnDef to describe the total columns, but it's not showing in the grid, because the total is not a row group. I can't find in the API a method to add a column that is not a Value column or a Pivot column in the ag-grid in pivot mode.
I want to know is someone find a way to do it in this context.
Nevermind, I find how to do it. You just have to push the columns you want as total using gridColumnApi.setSecondaryColumns. It's important to be aware of the colId and field to match the key of your row data corresponding.
I have data in object not a string for a column in ag-grid so i am unable to group the rows in ag-grid.
Is there any ways to tell the ag-grid that from which key it should group all the rows.
Complex objects can be grouped by key:
https://www.ag-grid.com/javascript-grid-grouping/#grouping-complex-objects-with-keys
how can I achieve below layout using a crosstab? Month in the top of the columns and columns below with their own names.
thanks
In the Cross-Tab Expert you can create groupings like this by just adding more columns (The outer-most groupings are those higher in the Column list). In your case, the first column of your Cross-Tab should be your record date with the option selected to print for each Month. Then just add the rest of your columns to your Cross-Tab as usual.
I have created the crosstab, added a formula that shows me the month name as column and the other fields as summarized fields. Then on crosstab expert -> Customized Style tab, under columns section I selected my grand totals, checked show labels and Horizontal and was able to get the desired layout. Thanks #Ryan
I have a matrix in an SSRS 2008 report. The rows are grouped on the Time field, and the columns are grouped on the FieldName field. Pretty standard stuff, you can see the designer view of it below.
This works pretty well, except that in some instances I need to hide the "time" column (highlighted in the image).
I've tried setting the Hidden property, both on the column itself and the individual fields. This leaves a large empty area where the column would normally display. I've tried setting the hidden value for the time row group, but that hides the entire row of data.
Is there any way to hide this information with SSRS 2008?
I was able to find a work-around with a little experimentation. Here's what I did:
Added an adjacent column group to the FieldName column. This column was grouped on Time (the same as the row group).
Set the header of the new column group to always display the text "Time."
Right-clicked on the selection button for this new column and selected "Column Visibility..." from the list. Entered the hidden expression I wanted.
Deleted the original Time column, choosing to retain the associated group.