# DataGridStateMethods (@salmonui/data-grid)

> The DataGridStateMethods type of @salmonui/data-grid: Instance state methods (ref, useDataGridApi()).

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

```ts
import type { DataGridStateMethods } 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: type

```ts
type DataGridStateMethods = Omit<DataGridStateApi, 'initialState'>;
```

Instance state methods (`ref`, `useDataGridApi()`).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `getState` | `getState: (options?: DataGridStateOptions \| undefined) => DataGridState;` | inherited | Persistable state (columns, pinning, sorting, filters, grouping, paging, search, selection, scroll). |
| `restoreState` | `restoreState: (state: string \| DataGridState, options?: (DataGridStateOptions & DeserializeDataGridStateOptions) \| undefined) => RestoreResult;` | inherited | Restores a state (object or serialized) in one batch without recompiling columns. |
| `resetState` | `resetState: () => RestoreResult;` | inherited | Restores the state captured when this API was created. |
