# pivotColumnsChanged

Emitted when the pivot result column model changes. Update chart and export code using previous result column IDs.

Canonical: https://grid.syidax.com/docs/events/pivotColumnsChanged/

<a id="meaning"></a>

## What does this API do?

Emitted when the pivot result column model changes. Update chart and export code using previous result column IDs.

API for Pro features: Pivot

<a id="contract"></a>

## Exact input and result types

```typescript
pivotColumnsChanged: SyGridPivotColumnsChangedDetail
```

<a id="usage"></a>

## Usage flow

Subscribe with grid.addEventListener('pivotColumnsChanged', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.

```javascript
const controller = new AbortController();
grid.addEventListener('pivotColumnsChanged', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

<a id="types"></a>

## Read related types

- [SyGridPivotColumnsChangedDetail](https://grid.syidax.com/docs/types/SyGridPivotColumnsChangedDetail.md)

<a id="recipes"></a>

## Feature explanations and examples

- [Pivot analysis](https://grid.syidax.com/docs/features/pivot.md) — Pivoting divides source orders into row, column, and value axes to create a cross-tabulation. Unlike collapsible row groups, unique values such as statuses become new result columns.
