简体   繁体   English

AG-Grid“平面”列组

[英]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. 我在金融应用程序中使用ag-grid进行吸墨纸打印,但是遇到了一个我无法找到解决方案的问题。 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. 即,一个安全性具有多个标识符... ISIN,CUSIP,TICKER等。它们始终是一对一的关系,因此对于任何给定的安全性而言,每个都有一个,并且它们都是唯一的。 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. 我需要能够创建数据透视表,或者将所有三个这些标识符都扁平化的标识符全部分组到一个单独的行中,或者按其中任何一个分组,但还要在该行中显示相关的CUSIP和TICKER为了安全。 Without this feature I am not able to use ag-grid to produce adequate position views for my purposes. 没有此功能,我将无法使用ag-grid来生成足够的位置视图。

Thanks, Troy 谢谢,特洛伊

I think the property you are looking for is groupHideOpenParents . 我认为您要查找的属性是groupHideOpenParents

With groupHideOpenParents={false} : 使用groupHideOpenParents={false}

在此处输入图片说明

With groupHideOpenParents={true} : 使用groupHideOpenParents={true}

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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