# collapseAllTreeNodes

Collapses all branch nodes in the current tree.

Canonical: https://grid.syidax.com/docs/methods/collapseAllTreeNodes/

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

## What does this API do?

Collapses all branch nodes in the current tree.

API for Pro features: Tree data

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

## Exact input and result types

```typescript
collapseAllTreeNodes(): Promise<void>
```

| Arguments | Required | Type |
| --- | --- | --- |

The return type is `Promise<void>`.

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

## Usage flow

After registering and initializing the Grid element, call grid.collapseAllTreeNodes(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

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

## Feature explanations and examples

- [Tree data](https://grid.syidax.com/docs/features/tree-data.md) — Trees display parent-child data, such as folders or organizations, with indentation and expansion controls. Unlike grouping equal values, the parent relationship already exists in the data.
