1
votes

I tried setting rowGrouping to a specific column as shown below:

    columnDefs[index]["rowGroup"] = true;
    this.setState({ columnDefs: columnDefs });
    params.api.setColumnDefs(columnDefs);

The grid is getting rerendered but the row grouping is not getting set. Is there any other ag-grid api to set the row groups manually(just like columnApi.setColumnVisible to hide/show a specific column).

1

1 Answers

0
votes

Looks like your updated columnDefs is not being applied to the grid.

Setting your columnDef to an empty array or creating a new ColumnDef object altogether should solve this.

  gridOptions.api.setColumnDefs([]);
  gridOptions.api.setColumnDefs(newColDefs);