Skip to content

Data grid - Column header

Customize your columns header.

You can configure the headers with:

  • headerName: The title of the column rendered in the column header cell.
  • description: The description of the column rendered as tooltip if the column header name is not fully displayed.
Username
Age
@MUI
20

Rows per page:

1โ€“1 of 1

Press Enter to start editing

Custom header renderer

You can customize the look of each header with the renderHeader method. It takes precedence over the headerName property.

const columns: GridColDef[] = [
  {
    field: 'date',
    width: 150,
    type: 'date',
    renderHeader: (params: GridColumnHeaderParams) => (
      <strong>
        {'Birthday '}
        <span role="img" aria-label="enjoy">
          ๐ŸŽ‚
        </span>
      </strong>
    ),
  },
];
Birthday ๐ŸŽ‚
1/1/1979
2/1/1984
3/1/1992

Rows per page:

1โ€“3 of 3

Press Enter to start editing

Styling header

You can check the styling header section for more information.

Column menu

By default, each column header displays a column menu. The column menu allows actions to be performed in the context of the target column, e.g. filtering. To disable the column menu, set the prop disableColumnMenu={true}.

Desk
Commodity
Trader Name
Trader Email
D-4314
Wheat
Trevor Ward
D-7327
Corn
Sallie White
D-8701
Milk
Flora Carson
D-4050
Coffee C
Clifford Hampton
D-714
Corn
Seth Howell
D-9431
Sugar No.11
Luella Richards
D-1357
Coffee C
Ricardo Russell
D-2906
Corn
Addie Morales
D-9730
Oats
Virgie Clarke

Rows per page:

1โ€“20 of 20

Press Enter to start editing