简体   繁体   English

Agg Function 显示 Ag-grid

[英]Agg Function Display Ag-grid

I am using the sum aggregate function as part of my col def.我正在使用sum聚合 function 作为我的 col def 的一部分。 This changes the headerName of the column to sum(gold) , is there a way of changing this displayed text to something else or not having any text at all so it just shows the column name eg just displays " gold ".这会将列的headerName更改为sum(gold) ,有没有办法将此显示的文本更改为其他内容或根本没有任何文本,所以它只显示列名,例如只显示“ gold ”。

Thanks谢谢

在此处输入图像描述

Set suppressAggFuncInHeader on your grid to true .将网格上的suppressAggFuncInHeader设置为true

suppressAggFuncInHeader : 抑制AggFuncInHeader

When true, column headers won't include the aggFunc, eg 'sum(Bank Balance)' will just be 'Bank Balance'.如果为真,列标题将不包含 aggFunc,例如,“sum(Bank Balance)”将只是“Bank Balance”。

Demo .演示

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

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