# Multi Row Header
URL: https://pro.rv-grid.com/api/multi-row-header/
Source: src/content/docs/api/multi-row-header.md
## Module Extensions

### `AdditionalData` (Extended from `@revolist/revogrid`)

```ts
interface AdditionalData {
  multiRowHeader?: MultiRowHeaderConfig
}
```

---

### `ColumnRegular` (Extended from `@revolist/revogrid`)

```ts
interface ColumnRegular {
  /**
       * Prevent this leaf header from spanning unused multi-row header depth.
       */
      suppressSpanHeaderHeight?: boolean
}
```

---

### `HTMLRevoGridElement` (Extended from `global`)

```ts
interface HTMLRevoGridElement {
  multiRowHeader?: MultiRowHeaderConfig;
  'multi-row-header'?: MultiRowHeaderConfig
}
```

## Plugin API

### `MultiRowHeaderPlugin`

Enhances RevoGrid grouped column headers with AG Grid / DevExtreme-style
multi-row leaf header spanning while keeping the existing ColumnGrouping API.

#### Dependencies

- **Config integration** `grid.multiRowHeader`: Reads multi-row header configuration from the grid multiRowHeader DOM property.
- **Config integration** `additionalData.multiRowHeader`: Reads legacy multi-row header configuration from additionalData.multiRowHeader.

```ts
class MultiRowHeaderPlugin {
  destroy(): void;
}
```

---

### `getMultiRowHeaderLeafKey`

```ts
export function getMultiRowHeaderLeafKey(
  colType: DimensionCols,
  columnIndex: number,
): string;
```

---

### `createMultiRowHeaderLayout`

```ts
export function createMultiRowHeaderLayout(
  columns: MultiRowHeaderColumn[] = [],
): MultiRowHeaderLayout;
```

---

### `resolveMultiRowHeaderConfig`

```ts
export function resolveMultiRowHeaderConfig(
  config?: MultiRowHeaderConfig,
): ResolvedMultiRowHeaderConfig;
```

---

### `MultiRowHeaderConfig`

```ts
export type MultiRowHeaderConfig = boolean | {
  /**
   * Let shallow leaf headers fill unused group header depth.
   * Defaults to true.
   */
  spanLeafHeaders?: boolean;
};
```

---

### `ResolvedMultiRowHeaderConfig`

```ts
export type ResolvedMultiRowHeaderConfig = {
  enabled: boolean;
  spanLeafHeaders: boolean;
};
```

---

### `MultiRowHeaderColumn`

```ts
export type MultiRowHeaderColumn = ColumnRegular | ColumnGrouping;
```

---

### `MultiRowHeaderLeafInfo`

```ts
export type MultiRowHeaderLeafInfo = {
  colType: DimensionCols;
  columnIndex: number;
  depth: number;
  spanRows: number;
  suppressSpanHeaderHeight: boolean;
};
```

---

### `MultiRowHeaderLayout`

```ts
export type MultiRowHeaderLayout = {
  maxDepth: number;
  leaves: Map<string, MultiRowHeaderLeafInfo>;
};
```
