gridcn2.0.0
Cheatsheets and messagesMessages

Thrown errors

Look up the errors that the grid throws, and fix their cause.

Most console warnings print only in a development build, and most print once. A word in angle brackets, such as <id>, stands for a value that the grid fills in. A message that ends in ... continues past the text that the table quotes. The tables leave out the backticks that some messages put around prop names.

Errors the grid throws

The grid throws these errors, or hands them to an error callback. Fix the cause in your code.

MessageWhat to doPage
fetchRows rejectedReaches onError and server.error when fetchRows rejects with no error value. Reject with an Error to give it a message.Handle failures
[data-grid] a row has no string or number id field. Pass getRowId to identify rows.Pass getRowId, or give every row an id field.DataGrid props
[data-grid] this hook must be used inside a <DataGridProvider>.Call the hook in a component below DataGridProvider.Store hooks
[data-grid] this component or hook must be rendered inside a <DataGridRoot>.Render the component, or call the hook, below DataGridRoot.DataGridProvider
[data-grid] no internal actions registered for this storeUse the store that the provider or useDataGridStoreProps created.DataGridProvider
<component> must be rendered inside <Dropzone>Render the dropzone parts inside Dropzone.Import options
fetchRows must resolve with { groups, groupCount } for childKind "groups"Answer a request of childKind: "groups" with a groups array and a groupCount.Server rows contract
fetchRows must answer totalRowCount with the top level of groupsAdd totalRowCount to the answer of the top level (groupPath: []).Server rows contract
fetchRows answered <field> that is not an objectAnswer each group as an object with key, childCount, and totalRowCount.Server rows contract
fetchRows answered <field> that is not a non-negative integerAnswer groupCount, childCount, and totalRowCount as whole numbers of zero or more.Server rows contract
fetchRows answered <field> that is not a string of at most 1024 characters, a finite number, a boolean, or nullAnswer each group key as a short string, a finite number, a boolean, or null.Server rows contract
fetchRows answered the key <key> twice (<field>); null and "" are one group, and 1 and "1" are one groupAnswer each group once. Merge null and "" into one group on the server.Server rows contract
fetchRows returned the row id <id>, which starts with a prefix the grid reserves (<prefixes>)Use row ids that do not start with __group:, __pinned-, or __lazy-unloaded-.Server rows contract
[data-grid-server] fetchRows returned <n> groups for a request of <limit>; only the first <limit> are usedReturn at most the number of groups that the request asks for.Server rows contract
[data-grid-server] <field> <count> is above <max>; using <max>Return a smaller count. The grid uses the maximum.Row limits
[data-grid-server] <field>.label is longer than 1024; cutReturn a label of at most 1,024 characters.Server rows contract
[data-grid-server] <field>.aggregates.<id> must be a finite number or null; showing nullReturn a finite number, or null when no value counted, for each requested aggregate.Server rows contract
fetchRows of useDataGridServerRows must resolve with { rows: TData[] }Return an object with a rows array from fetchRows.Server rows contract
[data-grid] column "<id>" has no accessorKey or accessorFn to readGive the column an accessorKey or an accessorFn.ColumnDef
[data-grid] column "<id>" is not writable (no setValue or accessorKey)Give the column a setValue or an accessorKey, or make it readOnly.ColumnDef
[data-grid-pagination] <part> must be used inside a <DataGridPaginationBar>.Render the pagination parts inside DataGridPaginationBar.Client pagination
[data-grid-pagination] this grid's rows come from a server; spread pager.gridProps (from useDataGridServerPager) onto DataGridProvider, or spread pager onto DataGridPaginationBarSpread gridProps of useDataGridServerPager onto DataGridProvider, or spread pager onto DataGridPaginationBar.Client pagination
The stored views are too large to readcreateLocalStorageViewsStorage throws it on load when the stored text is too long. DataGridViews shows the load error, and onError receives it. Clear the stored key.Saved views
Browser storage is not availablecreateLocalStorageViewsStorage throws it on save when localStorage is blocked. The views stay in memory, DataGridViews shows the save error, and onError receives it. Pass your own storage.Saved views
The saved views are in an unknown formatuseDataGridViews reports it through error and onError when load resolves a value it cannot read. Return the document that save received.Saved views
The saved views are too large to storeuseDataGridViews reports it through error and onError and skips that save. Delete views until the document is smaller.Saved views
unknown sheet "<name>"Pass the name of a sheet that the file has.Import options
[data-grid-io] invalid xlsx sheet name: <name>Pass a sheetName of 1 to 31 characters, without an apostrophe at either end, other than History, and without \ / ? * [ ] :.Export options
[data-grid-io] an export source batch must be an arrayReturn an array of rows, or yield arrays of rows, from the export source.Export the whole result
[data-grid-io] an export source returned only empty batchesEnd the source when it has no more rows. Do not yield endless empty batches.Export the whole result
[data-grid-io] an export source returned too many empty rowsReturn rows only. Remove null and undefined entries from the batches.Export the whole result
[data-grid-io] unknown export column: <id>Pass column ids that exist in the grid.Export options
[data-grid-io] unsupported csvEncoding: <name>Pass a supported encoding name as csvEncoding, for example utf-8 or windows-1252.Import options
fetchAggregates must resolve an object of { [columnId]: value }Resolve an object keyed by column id from fetchAggregates. useDataGridServerAggregate catches the error, sets the status "error", and calls onError.Show totals from a server
comments fetch timed outReaches onFetchError when a fetchComments request does not settle within 30 seconds. Answer faster, or answer fewer rows.Comments options
fetchComments must resolve to an arrayResolve an array of CellComment records from fetchComments.Comments options
fetchOptions must resolve an array of { value, label }Resolve an array of { value, label } objects from fetchOptions. The lookup editor catches the error and shows the error line with a Retry button.Lookup cell

On this page