简体   繁体   中英

AG-Grid 'Flat' column group

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? Ie 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? Ie 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

I think the property you are looking for is groupHideOpenParents .

With groupHideOpenParents={false} :

在此处输入图片说明

With groupHideOpenParents={true} :

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM