# Error on AG Grid grouping form

**URL:** <https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975>\
**Category:** Questions\
**Created:** [May 13, 2025, 10:09am UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975 "2025-05-13T10:09:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [May 13, 2025, 10:09am UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975/1 "2025-05-13T10:09:37Z")

</div>

Having a form with groupings like shown in the screenshot, I get the following error. But only the first time the form is shown.

```auto
ERROR org.sablo.BrowserConsole - AG Grid: setRowCount cannot be used while using row grouping. buildStackMessage@http://localhost:8183/chunk-VOCGXZNC.js:34952:24
apply@http://localhost:8183/chunk-VOCGXZNC.js:34782:53
@[native code]
setRowCount@http://localhost:8183/chunk-VOCGXZNC.js:87428:20
refreshAgGridServerSide@http://localhost:8183/chunk-VOCGXZNC.js:142244:34
purgeImpl@http://localhost:8183/chunk-VOCGXZNC.js:143303:33
purge@http://localhost:8183/chunk-VOCGXZNC.js:143289:21
updateColumnDefs@http://localhost:8183/chunk-VOCGXZNC.js:143696:15
svyOnChanges@http://localhost:8183/chunk-VOCGXZNC.js:141981:38
ngOnChanges@http://localhost:8183/chunk-VOCGXZNC.js:27988:26
rememberChangeHistoryAndInvokeOnChangesHook@http://localhost:8183/chunk-OXDVZTBT.js:5284:21
callHookInternal@http://localhost:8183/chunk-OXDVZTBT.js:5835:14
callHook@http://localhost:8183/chunk-OXDVZTBT.js:5853:21
callHooks@http://localhost:8183/chunk-OXDVZTBT.js:5824:17
executeCheckHooks@http://localhost:8183/chunk-OXDVZTBT.js:5788:12
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9835:28
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewIfAttached@http://localhost:8183/chunk-OXDVZTBT.js:9975:24
detectChangesInEmbeddedViews@http://localhost:8183/chunk-OXDVZTBT.js:9948:36
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9850:33
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewIfAttached@http://localhost:8183/chunk-OXDVZTBT.js:9975:24
detectChangesInEmbeddedViews@http://localhost:8183/chunk-OXDVZTBT.js:9948:36
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9850:33
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewIfAttached@http://localhost:8183/chunk-OXDVZTBT.js:9975:24
detectChangesInEmbeddedViews@http://localhost:8183/chunk-OXDVZTBT.js:9948:36
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9850:33
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewIfAttached@http://localhost:8183/chunk-OXDVZTBT.js:9975:24
detectChangesInEmbeddedViews@http://localhost:8183/chunk-OXDVZTBT.js:9948:36
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9850:33
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewIfAttached@http://localhost:8183/chunk-OXDVZTBT.js:9975:24
detectChangesInEmbeddedViews@http://localhost:8183/chunk-OXDVZTBT.js:9948:36
refreshView@http://localhost:8183/chunk-OXDVZTBT.js:9850:33
detectChangesInView$1@http://localhost:8183/chunk-OXDVZTBT.js:9991:16
detectChangesInViewWhileDirty@http://localhost:8183/chunk-OXDVZTBT.js:9788:24
detectChangesInternal@http://localhost:8183/chunk-OXDVZTBT.js:9774:34
detectChanges@http://localhost:8183/chunk-OXDVZTBT.js:10250:26
detectChanges@http://localhost:8183/chunk-VOCGXZNC.js:42567:37
formMessageHandler@http://localhost:8183/chunk-VOCGXZNC.js:38812:32
@http://localhost:8183/chunk-VOCGXZNC.js:38426:40
finally@http://localhost:8183/chunk-VOCGXZNC.js:38252:8
@http://localhost:8183/chunk-VOCGXZNC.js:38425:66
handleMessage@http://localhost:8183/chunk-VOCGXZNC.js:32949:60
onInvoke@http://localhost:8183/chunk-OXDVZTBT.js:10593:31
run@http://localhost:8183/polyfills.js:10768:41
next@http://localhost:8183/chunk-OXDVZTBT.js:605:29
_next@http://localhost:8183/chunk-OXDVZTBT.js:576:26
next@http://localhost:8183/chunk-OXDVZTBT.js:549:17
@http://localhost:8183/chunk-OXDVZTBT.js:814:15
next@http://localhost:8183/chunk-OXDVZTBT.js:549:17
@http://localhost:8183/chunk-OXDVZTBT.js:989:24
errorContext@http://localhost:8183/chunk-OXDVZTBT.js:518:7
next@http://localhost:8183/chunk-OXDVZTBT.js:982:17
dispatchEvent@http://localhost:8183/chunk-VOCGXZNC.js:31940:22
@http://localhost:8183/chunk-VOCGXZNC.js:32107:38
wrapFn@http://localhost:8183/polyfills.js:11299:40
runTask@http://localhost:8183/polyfills.js:10806:47
invokeTask@http://localhost:8183/polyfills.js:11071:33
invokeTask@http://localhost:8183/polyfills.js:11597:18
globalCallback@http://localhost:8183/polyfills.js:11618:31

```

 ![AG Grid grouping](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/3/387878b59297c3519151bb3cd0c06e9a154a200c.png)

Version: 2024.3.6.3949\_LTS  
NGTi

---

<div class="post-metadata">

**Author:** ![Gabi\_Boros](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@Gabi\_Boros](https://forum.servoy.com/u/Gabi_Boros)\
**Post date:** [May 14, 2025, 2:07pm UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975/2 "2025-05-14T14:07:23Z")

</div>

which version of NG Grids do you use? because in the code there is a check to skip calling setRowCount if in grouping mode ( [aggridcomponents/aggrid/projects/nggrids/src/datagrid/datagrid.ts at 2024.3 · Servoy/aggridcomponents · GitHub](https://github.com/Servoy/aggridcomponents/blob/2024.3/aggrid/projects/nggrids/src/datagrid/datagrid.ts#L1254) ) … and the error is complaining about that …

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [May 15, 2025, 8:22am UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975/3 "2025-05-15T08:22:21Z")

</div>

Good morning Gabby

Thanks for your mail and digging in to the setRowCount problem. The Version in Servoy Package Manager of Servoy NG Grids is in our Developers: 2024.3.8. This is the latest for our Developers Version: 2024.3.6.3949\_LTS.

I hope that helps, otherwise please ask.

Thanks for your effort and best regards  
Robert

![7rLogo.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/a/a786233df39a3521b9d5e207bc8a15a3b80a026f.png)

Softwareentwicklung

---

<div class="post-metadata">

**Author:** ![Gabi\_Boros](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@Gabi\_Boros](https://forum.servoy.com/u/Gabi_Boros)\
**Post date:** [May 15, 2025, 9:10am UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975/4 "2025-05-15T09:10:59Z")

</div>

I see that version has the code to skip the call if grouped ( [aggridcomponents/aggrid/projects/nggrids/src/datagrid/datagrid.ts at v2024.3.8 · Servoy/aggridcomponents · GitHub](https://github.com/Servoy/aggridcomponents/blob/v2024.3.8/aggrid/projects/nggrids/src/datagrid/datagrid.ts#L1254) ) but it could be that the function used to check the groping mode is not working correctly on first show? - can you create a case in our support system for this, if possible with a sample

---

<div class="post-metadata">

**Author:** ![huber](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/huber/32/5042_2.png) [@huber](https://forum.servoy.com/u/huber)\
**Post date:** [May 15, 2025, 2:54pm UTC](https://forum.servoy.com/t/error-on-ag-grid-grouping-form/23975/5 "2025-05-15T14:54:07Z")

</div>

Have made a case (say-20249)
