AG Grid,带有父级分组的列选择器,但在网格中没有可见的父级分组。

huangapple go评论108阅读模式
英文:

AG Grid, column chooser with parent groups, but without visible parent groups in the grid

问题

在ag-grid的演示页面中,我们可以看到有一个列选择器与分组一起显示:

但是,将此配置提供给ag-grid后,它会在网格本身中创建这些分组,您可以在上面的屏幕中看到Participant、Game of Choice,以及它们下面的子列。

我正在尝试的是在列选择器中具有相同的分组,但在网格中显示列的平面列表,而不显示父类别。

是否有人知道ag-grid属性中是否有某个布尔值可以打开/关闭此设置,或者是否有其他方法可以实现这一目标。谢谢!

英文:

In the demo page from ag-grid we could see that we got a column chooser with groups:

AG Grid,带有父级分组的列选择器,但在网格中没有可见的父级分组。

but giving this configuration to ag-grid, it creates those groups in the grid itself, you could see that in above screen we got Participant, Game of Choice, and bellow these we got the children columns.

What I am trying to do is actually to have the same groups in the column chooser, but to have a flat list of columns in the grid without Parent Categories displayed.

Does anyone know maybe there is some boolean in the ag-grid props that could turn on/off this setting, or another way of doing this. Thanks!

答案1

得分: 1

到目前为止我找到的唯一方法是用CSS进行一个小的修改。基本上你只需要隐藏所有标题行,除了最后一行:

AG Grid,带有父级分组的列选择器,但在网格中没有可见的父级分组。

英文:

The only way that i found till now it is to do a small hack with css. Basically you just hide all header rows, except the last row:

AG Grid,带有父级分组的列选择器,但在网格中没有可见的父级分组。

huangapple
  • 本文由 发表于 2023年5月22日 16:16:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76304228.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定