# defineChildGrid (@salmonui/data-grid)

> The defineChildGrid function of @salmonui/data-grid: Types a childGrid by its child row type (identity at runtime). The childGrid prop holds child grids of any row type, so its child rows are unknown; this helper checks the config against Child and Parent.

Canonical: https://salmonui.dev/docs/reference/data-grid/defineChildGrid

```ts
import { defineChildGrid } from '@salmonui/data-grid';
```

Entry index: https://salmonui.dev/docs/reference/data-grid (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid.md).

## Reference

Kind: function

```ts
function defineChildGrid<Child, Parent = unknown>(config: DataGridChildGrid<Child, Parent>): DataGridChildGrid<unknown, Parent>;
```

Types a `childGrid` by its child row type (identity at runtime). The
`childGrid` prop holds child grids of any row type, so its child rows are
`unknown`; this helper checks the config against `Child` and `Parent`.
