# Table Layouts - Column Headers

Canonical page: https://www.adaptabletools.com/docs/handbook-layouts-table-column-headers

- The Table Layout supports displaying custom Column Headers

[Layouts](https://www.adaptabletools.com/docs/handbook-layouts/index.md) · [Table Layouts](https://www.adaptabletools.com/docs/handbook-layouts-table/index.md) · [All Table Layout Topics](https://www.adaptabletools.com/docs/handbook-layouts-table/index.md#table-layout-topics).
Column headers in ColDefs and [Developer Guide — Column Headers](https://www.adaptabletools.com/docs/dev-guide-columns-column-headers/index.md) — not duplicated here.

Developers can provide **alternative Column headers** in a Table Layout.

The [Developer Guide to Configuring Column Headers](https://www.adaptabletools.com/docs/dev-guide-columns-column-headers/index.md) explains more about the 2 ways this can be done in AdapTable

This means that they can set different text for the Header of the Column on a per-Layout basis.

- This changes the **text** of the Column's Caption (i.e. in the AG Grid Column Header)
- It does **not change** the Column's `FriendlyName` (which remains the ColumnDef `Header` value)

### Setting Column Headers

The `ColumnHeaders` property (of type [`ColumnStringMap`](https://www.adaptabletools.com/docs/reference/columnstringmap.md)) is an array containing 2 properties:

- `ColumnId` - a string (the id of the Column)
- the caption for the Column (string)  

```ts [[1, 9, "ColumnHeaders"]]
// Provide different Column Headers for name and github_stars columns
const initialState: InitialState = {
 Layout: {
    CurrentLayout: 'Column Headers Layout',
    Layouts: [
    {
      Name: 'Column Headers Layout',
      TableColumns: ['name', 'github_stars', 'license', 'github_watchers', 'language', 'description', 'open_pr_count'],
      ColumnHeaders: {
        github_stars: 'Fans',
        name: 'Framework',
      },
    }
  ]
 },
};
```

**Example: Table Layouts: Column Headers**

Creating Table Layouts with custom Column Headers

- This example contains a `Custom Header Names` Layout where 2 column have been renamed:
  - *Name* is now `Project`
  - *Language* is `Programming Language`

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Table Layouts Column Headers',
  initialState: {
    Dashboard: {
      ModuleButtons: ['Layout'],
      Tabs: [
        {
          Name: 'Default',
          Toolbars: ['Layout', 'GridFilter'],
        },
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    CustomSort: {
      CustomSorts: [
        {
          Name: 'customSort-license',
          ColumnId: 'license',
          SortedValues: ['Other'],
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Custom Header Names',
      Layouts: [
        {
          ColumnHeaders: {
            name: 'Project',
            language: 'Programming Language',
          },
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'description',
            'open_issues_count',
            'closed_issues_count',
            'open_pr_count',
            'closed_pr_count',
            'has_projects',
            'has_pages',
            'week_issue_change',
          ],
          //  AutoSizeColumns: true,
          Name: 'Custom Header Names',
        },
      ],
    },
  },
};
```
