---
url: https://akinozgen.github.io/datagrids/errors/DG001.md
description: >-
  One datagrids warning or error code — the message, when it happens and how to
  fix it.
---

# DG001: Unknown grid option

```text
[datagrids DG001] Unknown option `{name}`.{hint}
```

Printed with `console.warn`, once per distinct message. `configure({ warnings: false })` silences it.

## When it happens

The options object passed to `new Datagrid()` has a key that is not a grid option. The key is ignored.

The message adds a hint: for a well-known legacy option name (compared case-insensitively) it names the
replacement; for anything within two typing edits of a real option it suggests that option
(`pagesize` → ``Did you mean `pageSize`?``).

## How to fix it

Rename or remove the key. The [grid options](/reference/options) are the only accepted keys; every other
capability is a column option or a [module](/modules/) in `use: [...]`.

| Key you passed | Hint printed |
|---|---|
| `serverSide` | Server mode is a module: use `serverSide({ url, protocol: yajra() })`. |
| `ajax` | Use the `serverSide({ url, … })` module. |
| `dom` | Use toolbar slots (`start`, `end`, `filters`). |
| `buttons` | Attach button modules (`button.reload()`, `excel()`…). |
| `language` | Use `messages`. |
| `stateSave` | Use the `stateSave()` module. |
| `lengthMenu` | Use `pageSizes`. |
| `pageLength` | Use `pageSize`. |
| `order` | Use `sort: [['key', 'desc']]`. |
| `deferLoading` | Use `load: 'manual'`. |
| `columnDefs` | Put options on the column definitions. |

The [migration guide](/migration/from-datatables) maps every legacy option.

## Related

* [All warning codes](/errors/)
* [Grid options](/reference/options)
* [Static API & configure()](/reference/static)
