Skip to content

Option levels

Check which configuration options take effect at the grid, column, and cell level.

Overview

You can write any option at any level. Handsontable resolves configuration through a prototype chain, so putting an option inside columns never throws an error.

Whether the option does anything is a different question. Each option is read at one specific level, and that read decides where the option takes effect:

  • An option read from the grid settings ignores column and cell values.
  • An option read from a column ignores cell values.
  • An option read from a cell responds to every level.

The matrix below answers that for every built-in option, so you don’t have to guess.

How to read the matrix

Each option lists the levels it takes effect at:

LevelSet it with
GridThe top-level settings object
columnsThe columns option
cellsThe cells function
cellThe cell option

Two facts explain most of the matrix:

  • There is no row level. Handsontable has no rows option and no row-level layer. You configure a row through the cells function, matching on the row coordinate - see Set row options.
  • Plugin options are grid level. Every plugin reads its own setting from the grid settings, so you cannot switch a plugin on for one column or one cell. Some plugins still read per-cell options once they are on - comments is turned on for the grid, then a comment is attached to a single cell. A few plugins go further and let you override their sub-options per column, which is why columnSorting and multiColumnSorting are marked for columns too. You still turn them on for the whole grid; check the Notes column before assuming a plugin can be enabled per column.

Options matrix

Search for an option by name, or filter the list down to a single level.

Can be set at

OptionGridcolumnscellscellCategoryNotes
activeHeaderClassNameYesNoNoNoCore
allowEmptyYesYesYesYesCore
allowHtmlYesYesYesYesCore
allowInsertColumnYesNoNoNoCore
allowInsertRowYesNoNoNoCore
allowInvalidYesYesYesYesCore
allowRemoveColumnYesNoNoNoCore
allowRemoveRowYesNoNoNoCore
ariaTagsYesNoNoNoCoreThe switch is grid level. A per-cell value only changes that cell’s ARIA attributes.
autoColumnSizeYesNoNoNoAutoColumnSize
autoLinkYesYesYesYesAutoLinkThe plugin toggle is grid level. A column or cell false opts out, and a column or cell object overrides target, schemes, strict, inline, and className for those cells.
autoRowHeaderSizeYesNoNoNoAutoRowHeaderSize
autoRowSizeYesNoNoNoAutoRowSize
autoWrapColYesNoNoNoCore
autoWrapRowYesNoNoNoCore
bindRowsWithHeadersYesNoNoNoBindRowsWithHeaders
cellYesNoNoNoCore
cellsYesNoNoNoCoreA grid-level function that is called for every cell.
checkedTemplateYesYesYesYesCore
classNameYesYesYesYesCore
colHeadersYesNoNoNoCore
collapsibleColumnsYesNoNoNoCollapsibleColumns
colorSchemeYesNoNoNoCore
columnHeaderHeightYesNoNoNoCore
columnsYesNoNoNoCore
columnSortingYesYesNoNoColumnSortingTurn the plugin on at the grid level. Inside columns you can override its sub-options for one column, such as indicator and headerAction, but not enable sorting there. sortFixedRows is the exception: it is grid-level only, because the frozen rows belong to the whole table. Read from the raw columns setting, like title.
columnSummaryYesNoNoNoColumnSummary
colWidthsYesNoNoNoCore
commentedCellClassNameYesYesYesYesCore
commentsYesNoNoNoComments
contextMenuYesNoNoNoContextMenu
copyableYesYesYesYesCore
copyPasteYesNoNoNoCopyPaste
currentColClassNameYesNoNoNoCore
currentHeaderClassNameYesNoNoNoCore
currentRowClassNameYesNoNoNoCore
customBordersYesNoNoNoCustomBorders
customBordersProgressiveYesNoNoNoCustomBorders
dataYesYesNoNoCoreSets the data set at the grid level and the column’s data property inside columns.
dataDotNotationYesNoNoNoCore
dataProviderYesNoNoNoCore
dataSchemaYesNoNoNoCore
dateFormatYesYesYesYesCore
dateTimeFormatYesYesYesYesCore
defaultDateYesYesYesYesCore
densityYesNoNoNoCore
dialogYesNoNoNoDialog
disableVisualSelectionYesYesYesYesCoreRow and column headers read the grid-level value only, and so does the check that gates dragging a selection with moveCells.
dragToScrollYesNoNoNoDragToScroll
dropdownMenuYesNoNoNoDropdownMenu
editorYesYesYesYesCore
emptyDataStateYesNoNoNoEmptyDataState
emptyValueYesYesYesYesCore
enterBeginsEditingYesNoNoNoCore
enterCommitsYesYesYesYesCore
enterMovesYesNoNoNoCore
exportFileYesNoNoNoExportFile
fillHandleYesNoNoNoCore
filterYesYesYesYesCore
filteringCaseSensitiveYesYesYesYesCore
filtersYesYesNoNoFiltersTurn the plugin on at the grid level. Inside columns, only false has an effect: it hides the filter controls in that column’s dropdown menu, and the API still filters the column. The sub-options searchMode and filterFixedRows are grid-level only.
filterSelectedItemsYesYesYesYesCore
filterValueComparatorYesYesNoNoFiltersOrders a column’s “Filter by value” list, which is built once per column. The comparator is read from the first listed row’s cell meta, so a cells or cell value is not a reliable way to set it. Set it at the grid level or inside columns.
fixedColumnsLeftYesNoNoNoCore
fixedColumnsStartYesNoNoNoCore
fixedRowsBottomYesNoNoNoCore
fixedRowsTopYesNoNoNoCore
formulasYesNoNoNoFormulas
fragmentSelectionYesNoNoNoCore
hashLengthYesYesYesYesCore
hashRevealDelayYesYesYesYesCore
hashSymbolYesYesYesYesCore
headerClassNameYesYesNoNoCoreApplies to column headers, so it stops at the column level.
heightYesNoNoNoCore
hiddenColumnsYesNoNoNoHiddenColumns
hiddenRowsYesNoNoNoHiddenRows
imeFastEditYesNoNoNoCore
importFileYesNoNoNoImportFile
initialStateYesNoNoNoCore
injectCoreCssYesNoNoNoCore
invalidCellClassNameYesYesYesYesCore
isEmptyColYesNoNoNoCore
isEmptyRowYesNoNoNoCore
labelYesYesYesYesCore
languageYesNoNoNoCore
layoutYesNoNoNoCore
layoutDirectionYesNoNoNoCore
licenseKeyYesNoNoNoCore
loadingYesNoNoNoLoading
localeYesYesYesYesCore
manualColumnFreezeYesNoNoNoManualColumnFreeze
manualColumnMoveYesNoNoNoManualColumnMove
manualColumnResizeYesNoNoNoManualColumnResize
manualRowMoveYesNoNoNoManualRowMove
manualRowResizeYesNoNoNoManualRowResize
maxColsYesNoNoNoCore
maxRowsYesNoNoNoCore
maxSelectionsYesYesYesYesCore
mergeCellsYesNoNoNoMergeCells
minColsYesNoNoNoCore
minRowHeightsYesNoNoNoCore
minRowsYesNoNoNoCore
minSpareColsYesNoNoNoCore
minSpareRowsYesNoNoNoCore
moveCellsYesNoNoNoCore
multiColumnSortingYesYesNoNoMultiColumnSortingTurn the plugin on at the grid level. Inside columns you can override its sub-options for one column, such as indicator and headerAction, but not enable sorting there. sortFixedRows is the exception: it is grid-level only, because the frozen rows belong to the whole table. Read from the raw columns setting, like title.
navigableHeadersYesNoNoNoCore
nestedHeadersYesNoNoNoNestedHeaders
nestedRowsYesNoNoNoNestedRows
notificationYesNoNoNoNotification
noWordWrapClassNameYesYesYesYesCore
numericFormatYesYesYesYesCore
observeDOMVisibilityYesNoNoNoCore
outsideClickDeselectsYesNoNoNoCore
paginationYesNoNoNoPagination
parsePastedValueYesYesYesYesCopyPaste
placeholderYesYesYesYesCore
placeholderCellClassNameYesYesYesYesCore
preserveNumericLiteralYesYesYesYesCore
preserveTextValueYesYesYesYesFormulas
preventOverflowYesNoNoNoCore
readOnlyYesYesYesYesCore
readOnlyCellClassNameYesYesYesYesCore
renderAllColumnsYesNoNoNoCore
renderAllRowsYesNoNoNoCore
rendererYesYesYesYesCore
renderModeYesYesYesYesCore
rowHeadersYesNoNoNoCore
rowHeaderWidthYesNoNoNoCore
rowHeightsYesNoNoNoCore
sanitizerYesNoNoNoCore
searchYesYesYesYesSearchThe plugin toggle is grid level. queryMethod and callback resolve per cell.
searchInputYesYesYesYesCore
selectionHandlesYesNoNoNoCore
selectionModeYesNoNoNoCore
selectOptionsYesYesYesYesCore
sheetsBarYesNoNoNoSheetsBar
skipColumnOnPasteYesYesYesYesCore
skipRowOnPasteYesYesYesYesCore
sortByRelevanceYesYesYesYesCore
sourceYesYesYesYesCore
sourceDataValidatorYesYesYesYesCore
sourceDataWarningMessageYesYesYesYesCore
sourceSortFunctionYesYesYesYesCore
startColsYesNoNoNoCore
startRowsYesNoNoNoCore
stretchHYesNoNoNoCore
strictYesYesYesYesCore
tableClassNameYesNoNoNoCore
tabMovesYesNoNoNoCore
tabNavigationYesNoNoNoCore
textEllipsisYesYesYesYesCore
textExtractorYesNoNoNoCore
themeYesNoNoNoCore
themeNameYesNoNoNoCore
timeFormatYesYesYesYesCore
titleNoYesNoNoCoreRead from the raw columns setting rather than the meta chain, so a cells function cannot set it.
trimDropdownYesYesYesYesCore
trimRowsYesNoNoNoTrimRows
trimWhitespaceYesYesYesYesCore
typeYesYesYesYesCore
uncheckedTemplateYesYesYesYesCore
undoYesNoNoNoUndoRedo
validatorYesYesYesYesCore
valueFormatterYesYesYesYesCore
valueGetterYesYesYesYesCore
valueParserYesYesYesYesCore
valueSetterYesYesYesYesCore
viewportColumnRenderingOffsetYesNoNoNoCore
viewportColumnRenderingThresholdYesNoNoNoCore
viewportRowRenderingOffsetYesNoNoNoCore
viewportRowRenderingThresholdYesNoNoNoCore
visibleRowsYesYesYesYesCore
widthYesYesYesYesCoreSets the grid width at the grid level and the column width inside columns. Only row 0 is read, so a cells or cell value must target row 0.
wordWrapYesYesYesYesCore

Options that change meaning by level

Two options mean different things depending on where you set them. Handsontable clears them on the column layer on purpose, so the grid value never leaks into a column.

OptionAt the grid levelInside columns
widthThe width of the whole gridThe width of that column
dataThe grid’s data setThe property that feeds that column

width has one more catch. Handsontable reads the column width from row 0 only. So a cells function changes a column’s width only when it returns width for row 0, and a cell entry has to name row 0.

Options that behave differently per level

For these options a single mark would mislead you:

  • ariaTags - the switch is grid level. A per-cell value only changes that cell’s ARIA attributes.
  • search - the plugin toggle is grid level, but queryMethod and callback resolve per cell.
  • disableVisualSelection - cells respond to every level, but row and column headers read the grid-level value only.