# CollectHeaderRowsContext

> _Since v2.10.0_

Context passed in PluginQuery.context for the `'collectHeaderRows'`
query — used by consumers (e.g. the export plugin) to collect extra header
rows that should sit **above** the leaf column-header row.

Plugins that contribute header rows (e.g. `GroupingColumnsPlugin`) declare
`{ type: 'collectHeaderRows' }` in their manifest and respond from
`handleQuery` with a HeaderRowContribution — or an array of them
for multi-row contributions (e.g. multi-level grouping). The consumer
flattens array replies.

The reply shape is intentionally generic — "here are some cells, each
spanning N leaf columns" — so consumers don't need to know which plugin
produced them. Responding plugins MUST align their contribution to the
`columns` array on this context — `span` values are indices into it.

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `columns` | <code><a href="/grid/api/core/interfaces/columnconfig/">ColumnConfig</a>&lt;any&gt;[]</code> | Resolved leaf columns (in display order) the consumer is about to emit. |
