Agnes Liszka
Agnes Liszka

Reputation: 69

How to add group column name of our choice

I am grouping elements in ag grid table. The default column name is Group.

enter image description here

Is it possible / how to add a name of our choice for the Group column (different than column names we have in our table)? https://www.ag-grid.com/javascript-grid/grouping/

Upvotes: 0

Views: 983

Answers (1)

Shuheb
Shuheb

Reputation: 2352

You can change the headerName property of the Auto Group Column by providing a headerName property in the autoGroupColumnDef:

gridOptions: {
    autoGroupColumnDef: {
        headerName:'Athletes'
    }
}

You can read more about this in the documentation: https://www.ag-grid.com/javascript-grid/grouping/#configuring-the-auto-group-column

Upvotes: 3

Related Questions