# setDetailRowExpanded

Expands or collapses a detail panel by stable parent row ID.

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

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

## What does this API do?

Expands or collapses a detail panel by stable parent row ID.

API for Pro features: Built-in master / detail

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

## Exact input and result types

```typescript
setDetailRowExpanded(rowId: string | number, expanded: boolean): Promise<void>
```

| Arguments | Required | Type |
| --- | --- | --- |
| rowId | Required | string \| number |
| expanded | Required | boolean |

The return type is `Promise<void>`.

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

## Usage flow

After registering and initializing the Grid element, call grid.setDetailRowExpanded(…). 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

- [Row details](https://grid.syidax.com/docs/features/master-detail.md) — Master/detail expands an order to show its line items or shipping history. The parent row is a summary, and a full-width panel beneath it holds details.
