Unable to set minimum width on the first column when using multiple level Row Grouping in Dash Ag Grid?

Hello Everyone:

I have a table where I am applying the Dash Ag Grid Enterprise’s Row Grouping on first two columns as below:

# [0] Adding Overall Column
    meta = {
        "headerName": Col.PORTFOLIO.ui,
        "field": Col.PORTFOLIO.lib,
        "sortable": True,
        "filter": True,
        "headerClass": "center-aligned-header",
        "rowGroup": True,
        "hide": True,
        "suppressColumnsToolPanel": False,
        "resizeable":False,
        "width":150,
        # "cellClass": "center-aligned-cell",
    }
    column_defs.append(__prettify_column(col_meta=meta))

    # [1] Adding group
    meta = {
        "headerName": Col.GROUP.ui,
        "field": Col.GROUP.lib,
        "sortable": True,
        "filter": True,
        "headerClass": "center-aligned-header",
        "rowGroup": True,
        "hide": False,
        "suppressColumnsToolPanel": True,

        "minWidth":150,
        # "cellClass": "center-aligned-cell",
    }
    column_defs.append(__prettify_column(col_meta=meta))

The Row Grouping works fine; although when I am trying to set the “minWidth” to the group columns (as shown above for portfolio and group column), it only seems to be taking effect on the “Col.GROUP.ui” column and not on the first level group i.e “Col.PORTFOLIO.ui”, which is completely invisible (i.e its width is 0) when the table renders.

Below is the Dash Ag Grid table creation code:

dag.AgGrid(
                    enableEnterpriseModules=True,
                    licenseKey=os.environ["AG_GRID_LICENSE_KEY"],
                    id="portfolio-holdings-groupby-benchmark-table",
                    columnDefs=column_defs,
                    rowData=holdings_data,
                    # defaultColDef={"flex": 1, "resizable": True},
                    defaultColDef={"resizable": True},
                    columnSize="responsiveSizeToFit",
                    csvExportParams={"fileName": "holdings.csv"},
                    style={"height": height},
                    className="ag-theme-alpine compact",
                    dashGridOptions={
                        # "pinnedBottomRowData": [overall_summ_row],
                        "enableCharts": True,
                        "enableRangeSelection": True,
                        "grandTotalRow": "bottom",
                        "groupTotalRow": "bottom",
                        "groupDefaultExpanded": 1,
                        "suppressAggFuncInHeader": True,
                    },
                )
            ]

Any ideas on what could be going wrong here? Apologies I could not paste a snapshot of the issue here (upload image option doesn’t seem to work for me here at the moment).

@AnnMarieW Would be great if you can chime in too.

Thanks a lot.

Hi @manish1022iiti

This post might help, it’s also about column with on hidden columns (and closed groups)

https://community.plotly.com/t/how-to-change-column-size-of-closed-column-groups-after-rowdata-is-updated/

Thanks for your response @AnnMarieW , this was helpful!