Skip to content

Settings

What createGrid takes, what Angular’s <dz-grid> takes as inputs and the Web Component as attributes or properties: the same settings everywhere. Each page gives the setting’s facts (its type, its default, whether update() changes it), what it does, an example in the three flavours and, when it shows something, a live grid.

Three are required: getRowId, columns and messages. The rest are optional.

NameTypeWhat it does
rowsIterable<T>The rows the grid shows, when the browser holds them all.
getRowId (required)(row: T) => RowIdInputHow the grid tells one row from another: required.
columns (required)readonly ColumnOrGroup<T>[]The columns, or groups of them: required.
messages (required)GridMessagesEvery text the grid shows or says, in one language: required, the grid bundles none.
localestringHow numbers and dates are written and how text sorts, apart from the texts' language.
timeZonestringThe time zone instants are shown, filtered and edited in.
numerals'latn' | 'locale'Latin digits everywhere, or the language's own.
direction'auto' | 'ltr' | 'rtl'Left to right, right to left, or the page's direction and its changes.
density'compact' | 'comfortable' | 'spacious'How tall the rows are and how much room the cells' sides take.
headers'shown' | 'hidden'The column headers on screen, or hidden from the eyes and kept for screen readers.
multiSortbooleanLet the user sort by several columns, or by one only.
sameRow(a: T, b: T) => booleanOn a full reload, keep a row that did not really change as it was.
rowHeightnumberThe rows' height in pixels, over the density's.
headerHeightnumber | HeaderHeightsThe header rows' height in pixels: the column headers, and the column-group rows above them.
selection{ readonly mode: 'none' | 'single' | 'multi'; readonly ch…Let the user select rows: one or several, with boxes or clicks, under your rules.
contextunknownThe application's own context, handed to every callback and part.
rowClass(c: RowClassContext<T>) => string | null | undefinedCSS classes for a data row, from its data.
overlay'loading' | 'error' | nullCover the rows with « Loading… » or the error message, or leave the grid to decide.
busybooleanSay that the rows on screen are being reloaded, without covering them.
labelstringThe grid's accessible name, already translated.
tooltips{ readonly delayMs?: number }How long the pointer rests before a tooltip shows.
onEvent(e: GridEvent<T>) => voidOne function that hears every grid event.
injectStylesbooleanWhether the grid writes its own layout CSS into the page, or your page loads it.
noncestringThe nonce the grid puts on the <style> elements it writes, for a strict Content Security Policy.
overscan{ readonly rows?: number; readonly cols?: number }How many rows and columns the grid draws beyond the view.
searchWarmup'idle' | 'off'Prepare the quick search in idle time, so the first keystroke is instant.
partsReadonly<Record<string, SlotPart>>Your own drawing for a cell, a header, a tooltip, the overlay: parts by name.
sourceSourceBinding<T>Rows that live on a server: the grid asks for what it shows.
operationsOperationsInputWhere filtering, search, sorting and paging run: the browser or the server.
paginationPageOptionsShow the rows one page at a time: the page size and the sizes offered.
filterKindsreadonly AnyFilterKind[]Your own kinds of column filter, for the browser and for a server.
clock() => numberThe « now » the date shortcuts and « today » count from.
fullWidth(row: Readonly<T>) => boolean | { readonly part?: string }Rows drawn as one cell across the whole width: a title, a note.
motionbooleanSwitch every movement of the grid off, whatever the reader's system asks.
themeGridThemeThe theme's CSS variables, set from code for one grid, by typed keys.
iconsGridIconsYour own icons for the grid's marks: sort, filter, menu, toggle, submenu, grip.
featuresreadonly GridFeature[]The optional features the grid is made with: filters, pages, editing, export…