Grid options
Every option of createGrid: data, row ids, selection, editing, pagination, summary rows, live updates, conditional formats, themes, fonts and language.
| Name | Type | Description |
|---|---|---|
columns | ColumnDef[] | Required. Column definitions. |
data | object[] | Rows. |
getRowId | (row) => string | Stable id; keeps selection across setData. |
rowSelection | 'single' | 'multiple' | Adds a checkbox column and click selection. |
rowClickSelection | boolean | With rowSelection, clicking a cell selects its row (default true). false: only the checkboxes and Space select, so cell clicks keep the checked rows. |
rowHeight / headerHeight | number | Pixels. Default follows the font size (36 / 40 at 13px). |
theme | string | 'light', 'dark', 'simple', 'board', 'erp', 'excel', 'classic' or your own. |
fontSize / fontFamily | number / string | Grid font. Row heights follow the size. |
cellPadding | number | Left and right space inside every cell and header cell, in px (default 12; density changes it). Change it later with setCellPadding. |
locale | string | LocalePack | UI language, e.g. 'ko' or an imported pack. Default: the browser's language. |
summaryPaid | SummaryOptions | Summary rows. See Summary rows. |
rangeSelectionPaid | boolean | Excel-style cell ranges by drag, Shift+click, Shift+arrows, Ctrl+A. Default true. |
statusBar | boolean | Row counts plus count/sum/average/min/max of the selected cells. |
fillHandlePaid | boolean | Drag the selection corner to fill editable cells. Default true. |
pinnedTopRows / pinnedBottomRows | Row[] | Rows fixed above or below the scrolling rows. |
findBar / wrapHeaderTextPaid · findBar | boolean | Ctrl+F find bar (default true); wrap all header labels. |
groupByPaid | string[] | Group rows by these column ids, in order. |
groupDefaultExpanded | number | Levels open at start: 0 none (default), n levels, -1 all. Also applies to tree data. |
groupPanelPaid | boolean | Bar above the header where headers can be dropped to group. |
treeData | { getParentId(row), setParentId?, hasChildren?, loadChildren? } | Nest rows under their parent id (needs getRowId). setParentId lets rows be dragged to another parent; hasChildren + loadChildren fetch children from a server on first expand. |
detailRenderer / detailHeight / isRowMaster | (params) => Element | string / number / (row) => boolean | Expandable panel under a row (default height 240); limit which rows can expand. |
rowDrag | boolean | { group?, canDrop?, copy?, copyRow? } | Handle column for dragging rows into a new order (off while sorted, filtered or grouped). In trees the middle of a row drops inside it. Grids with the same group exchange rows; copy (true | 'ctrl') copies into the other grid instead of moving (Ctrl / ⌘ while dropping copies too), copyRow makes the copy; canDrop({ row, target, position, fromOtherGrid, copy }) can refuse a target. |
autoSizeColumns | boolean | 'always' | Fit column widths to the header and the rows on screen once the first rows are drawn; 'always' also after new data. Leaves flex columns, autoSize: false, columns the user resized and saved widths alone. |
pagination | boolean | { pageSize?, pageSizes? } | Show one page at a time with a pager (default 100 rows per page). |
datasource | { getRows({ start, end, sort, filters, quickFilter, advancedFilter, groupBy, groupKeys }) } | Load rows from your server in blocks; must resolve to { rows, total? }. With groupBy, levels above the rows answer one row per group, e.g. { status, count, qty }. |
blockSize / maxBlocks | number | Rows per request (100) and blocks kept in memory (100). |
sideBarPaid | boolean | { open?, panels?: ('columns' | 'filters')[] } | Docked panels for columns and filters. |
rollupPaid | boolean | { by: string[] } | { by: [...] }: rows that agree on the shown by columns become one row; hide or remove one and the rows merge by the rest. true: every shown column without an aggFunc is a by column. Columns with an aggFunc show the aggregate; others show a shared value or stay empty. See Merge rows by columns. |
pivotPaid | { rows, columns?, values: { colId, aggFunc? }[], totals? } | Show the data as a pivot table. pivotPanel: true adds the Pivot side panel. |
autoRowHeight | boolean | Grow each row to fit its wrapped cells (wrapText columns); rowHeight is the minimum. |
direction | 'ltr' | 'rtl' | 'rtl' lays the grid out right to left (Arabic, Hebrew): first column on the right. |
cardView | boolean | number | Show rows as cards when the grid is narrower than this many px (true = 640). Phones: tap a focused cell to edit, long-press for the menu. |
isRowSelectable / headerCheckbox | (row) => boolean / boolean | Which rows can be checked (others show a disabled box); hide the select-all box with headerCheckbox: false. |
rowNumbers | boolean | { width?, header? } | A pinned column numbering data rows 1, 2, 3… (continues across pages). Click a number to select the row. |
sortWithinMergesPaid | boolean | Sorting reorders rows only inside each merged block; the blocks keep their order. |
mergeSelectionPaid | 'rows' | number | With merge columns and rowSelection: 'rows' (default) = a checkbox per row; n = one checkbox per block of the n-th merge column, checking all of its rows. |
rowClass / rowStyle | ({ row, rowIndex }) => string | CellStyle | Classes or colours for a whole row; rowStyle also goes into Excel, print and PDF. |
pasteAddsRows | boolean | ({ index }) => Row | Lines pasted past the last row become new rows. |
stateKey / stateParts / stateStorage | string / SavedStatePart[] / 'local' | 'session' | Keep the column layout and sort in the browser and restore it after a reload (default parts: columns, columnGroups, sort). |
dragToHide | boolean | Dragging a header up out of the header hides the column (default true). |
cellNotes / notes | boolean / CellNote[] | Notes on cells from the context menu; notes to start with. |
calculatedColumnsPaid | boolean | Column menu entry to add formula columns (default true). |
tooltipDelay / tooltipHideDelay / tooltipInteractive | number / number / boolean | Tooltip timing; keep it open while hovered. |
autoHeaderHeight / cellTextSelection | boolean | Headers grow to fit wrapped labels; drag selects cell text instead of cells. |
sortCaseSensitive / detailExpanded | boolean / boolean | (row) => boolean | Sort case apart; detail rows that start opened. |
filterRow | boolean | Boxes under the header that filter as you type: text contains (=exact, !not, a | b, wildcards, /regex/, Korean initials), numbers >10, <=5, 10~20, dates >2026-01-01 or the calendar button with relative dates, a list for set and option columns. |
groupSelectsChildren | boolean | Tree data: checking a parent also checks its children. Group rows always have a checkbox for their rows. |
editType | 'cell' | 'row' | 'row': a row is edited as a whole — Tab stays in the row, Enter or leaving saves it, Escape puts it back (rowEditStart / rowEditStop). |
getRowHeight | (row) => number | undefined | A height for each row (a minimum with autoRowHeight). |
autoHeight | boolean | The grid grows with its rows instead of scrolling inside; best for up to a few hundred rows. |
density | 'compact' | 'normal' | 'comfortable' | Row spacing; a fixed rowHeight wins. Change it later with setDensity. |
flashCells | boolean | Cells changed by applyTransaction flash briefly (default true). |
flashDuration / asyncTransactionWait | number | How long changed cells flash (ms, default 1000; numbers flash green up and red down) and how long applyTransactionAsync collects updates (ms, default 50). |
conditionalFormatsPaid | ConditionalFormat[] | Rules that colour cells by value or formula, top / bottom, averages and duplicates, plus data bars, colour scales and icon sets. conditionalFormatMenu: false hides the column menu item. |
noRowsOverlay / loadingOverlay | string | ({ filtered }) => string | HTMLElement | What to show when there are no rows (filtered: the filters hide them all) or while server rows load. |
overflowTooltip / advancedFilterPaid · advancedFilter | boolean | false turns off the full-text tooltip of cut-off cells / the "Advanced filter…" menu item. |
keymap | Record<string, action | false> | Remap or disable keys, e.g. { Enter: false, 'Ctrl+E': 'edit' }. |
contextMenuPaid | false | items | (params) => items | false keeps the browser menu; a list or a function customizes the right-click menu: built-in entries by name, submenus, icons, check marks, headings. |
headerContextMenuPaid | false | true | items | (params) => items | Right-click menu on column headers: sort, pin, group, size, hide; true for the built-in one. Left out: headers open the column menu. |
licenseKey | string | License key for this domain (a free personal key or a company key); paid features need one after the 30-day trial. Or call setLicenseKey(key) once for every grid on the page. |