Ag-Grid: Implementing Auto-Grouping Conditionally Based on Unique Column Values

Hi!

In my app I autogroup values as:

    dashGridOptions={
                        "groupDisplayType": "singleColumn",
                        "autoGroupColumnDef": {
                                "headerName": "Method",       
                                "minWidth":100,
                            }
                    }

This also creates a group where only one distinctive row of values exists. Does ag-grid offer a possibilty to group only if there is more than one distinctive row? I haven’t seen such case so far.

Have you checked the upstream docs for what you are looking for? We could provide a Dash example if needed: React Data Grid: Row Grouping

2 Likes

I solved it indirectly with:

"groupHideOpenParents": True

It is not a complete solution though because using this soltion together with custom agg functions can cause some (although minimal) grid flickering when adding new rows to the grid.