Reputation: 521
I am using ag-grid for blotters in a financial application, but I've run into an issue that I haven't been able to find a solution for. Is it possible to use the grouping feature somehow without a tree / parent child / drilldown view in the grid? I.e. if I group on two columns I would like to have the tree flattened so those two columns are visible on one line and have the grid rendered with one line for each unique combination of the two columns. So if I have fields Book, Security, and Position and I group by book and security I would like to just see one row for all unique book and security combinations with the sum of the positions for all of those pairs.
Along the same lines, I also need to display additional columns in a pivot table that are constant to a group. If there is a way to do the above feature then it would also resolve this issue, but if not, then is there a way I can do this? I.e. A security has multiple identifiers... ISIN, CUSIP, TICKER, etc. They are always a 1 to 1 relationship, so for any given security there is one of each and they are each unique. I need to be able to do a pivot table, grouping either by all three of those identifiers where they're all shown flattened on to a single row, or grouping by any one of them but also on that row show the related CUSIP and TICKER for that security. Without this feature I am not able to use ag-grid to produce adequate position views for my purposes.
Thanks, Troy
Upvotes: 0
Views: 1200
Reputation: 1971
I think the property you are looking for is groupHideOpenParents
.
With groupHideOpenParents={false}
:
With groupHideOpenParents={true}
:
Upvotes: 1