Skip to content

DG001: Unknown grid option ​

Console warning
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 are the only accepted keys; every other capability is a column option or a module in use: [...].

Key you passedHint printed
serverSideServer mode is a module: use serverSide({ url, protocol: yajra() }).
ajaxUse the serverSide({ url, … }) module.
domUse toolbar slots (start, end, filters).
buttonsAttach button modules (button.reload(), excel()…).
languageUse messages.
stateSaveUse the stateSave() module.
lengthMenuUse pageSizes.
pageLengthUse pageSize.
orderUse sort: [['key', 'desc']].
deferLoadingUse load: 'manual'.
columnDefsPut options on the column definitions.

The migration guide maps every legacy option.

Released under the MIT License.