# columnGroupToggled

Emitted when a column group header expands or collapses. Read groupId and open for its state.

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

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

## What does this API do?

Emitted when a column group header expands or collapses. Read groupId and open for its state.

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

## Exact input and result types

```typescript
columnGroupToggled: { groupId: string; open: boolean }
```

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

## Usage flow

Subscribe with grid.addEventListener('columnGroupToggled', 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('columnGroupToggled', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

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

## Feature explanations and examples

- [Multi-level headers](https://grid.syidax.com/docs/features/column-groups.md) — Multi-level headers place related columns under a shared heading. Unlike row grouping, they do not change data counts or aggregate values.
