简体   繁体   中英

avoid - aggregation in ag-grid

i have ag-grid. This is the column structure -

account share qty

i'm grouping by account (rowGroup = true). I have this sample data -

account share qty
234 xny 4
234 ghy 3

this appears as

account share qty
234 0
xny 4
ghy 3

note that 0 comes for qty. this is because i havenot provided any aggregateFunction to colDef. I want that qty cell to be empty for group level records (instead of showing a zero). is there a way to do it?

I'm not sure if this is the correct way but I was able to solve this by checking if the row is a group level row in my value formatter.

if the row is a group level row, i would return an empty string. otherwise, i would invoke the formatting function to show formatted data.

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