# Dash Ag Grid Row Grouping

**URL:** <https://community.plotly.com/t/dash-ag-grid-row-grouping/80352>\
**Category:** Dash Python\
**Tags:** community-components\
**Created:** [November 23, 2023, 1:59pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352 "2023-11-23T13:59:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiy](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Kiy](https://community.plotly.com/u/Kiy)\
**Post date:** [November 23, 2023, 1:59pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/1 "2023-11-23T13:59:01Z")

</div>

Hi,

I’m using Dash Ag Grid enterprise to group columns, I have a total which I want to show at the bottom and therefore doesn’t need the same grouping as other rows. Is there a way I can stop this row from having a dropdown and the (1) in brackets?

Thanks!  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/8/4/84c18d12f8d1663689a2997a888f2f1eb7be8307.png)

---

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [November 23, 2023, 2:46pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/2 "2023-11-23T14:46:36Z")

</div>

Hi @Kiy

Yes, that’s possible but there are not yet any examples in the dash docs. You can find more information on this page. If you want a Dash version of any of the examples, let me know.

> **[JavaScript Data Grid: Row Grouping - Group Footers](https://www.ag-grid.com/javascript-data-grid/grouping-footers/)**
>
> This section shows how to add group footers to show group level totals. Download v30 of the best JavaScript Data Grid in the world now.

---

<div class="post-metadata">

**Author:** ![Kiy](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Kiy](https://community.plotly.com/u/Kiy)\
**Post date:** [November 27, 2023, 9:29pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/3 "2023-11-27T21:29:57Z")

</div>

Hi @AnnMarieW, okay thanks!  
I’ve been testing a few things out and i’m struggling with custom AggFunc. Have you tried this out?

I even copied the example in the docs:

```auto
dagfuncs.ratioAggFunc = function (params) {
  let goldSum = 0;
  let silverSum = 0;
  params.values.forEach((value) => {
    if (value && value.gold) {
      goldSum += value.gold;
    }
    if (value && value.silver) {
      silverSum += value.silver;
    }
  });
  return createValueObject(goldSum, silverSum);
}

```

But if you console log value.silver or value.gold it thinks it doesn’t exist. For me params.values is just a list of values

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [November 27, 2023, 9:42pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/4 "2023-11-27T21:42:43Z")

</div>

Hello @Kiy,

There are three functions that need to come over in there if I remember correctly.

You should be able to check the dash docs for custom agg functions.

---

<div class="post-metadata">

**Author:** ![Kiy](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Kiy](https://community.plotly.com/u/Kiy)\
**Post date:** [November 27, 2023, 9:43pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/5 "2023-11-27T21:43:55Z")

</div>

yep I have those in too, I was just trying to show which bit doesn’t work.  
I’d copied the docs version and it doesn’t work @jinnyzor

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [November 27, 2023, 9:45pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/6 "2023-11-27T21:45:12Z")

</div>

What version of dag are you running?

---

<div class="post-metadata">

**Author:** ![Kiy](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Kiy](https://community.plotly.com/u/Kiy)\
**Post date:** [November 27, 2023, 9:47pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/7 "2023-11-27T21:47:03Z")

</div>

dash-ag-grid = “^2.4.0”

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [November 27, 2023, 9:55pm UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/8 "2023-11-27T21:55:14Z")

</div>

Could you please provide an MRE and then also a picture demonstrating how you would like the end result?

---

<div class="post-metadata">

**Author:** ![Kiy](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@Kiy](https://community.plotly.com/u/Kiy)\
**Post date:** [November 28, 2023, 9:05am UTC](https://community.plotly.com/t/dash-ag-grid-row-grouping/80352/9 "2023-11-28T09:05:01Z")

</div>

Apologies, I’ve actually figured it out now - I was grouping the column headers and I was using the wrong ID, very silly 🤦‍♂️
