Skip to content

ManualColumnFreeze

See the Column freezing guide for examples and configuration details.

Options

manualColumnFreeze

Can be set at: grid

Source code

manualColumnFreeze.manualColumnFreeze : boolean | object

The manualColumnFreeze option configures the ManualColumnFreeze plugin.

You can set the manualColumnFreeze option to one of the following:

SettingDescription
trueEnable the ManualColumnFreeze plugin
falseDisable the ManualColumnFreeze plugin
An objectEnable the ManualColumnFreeze plugin and configure it

The object form accepts the following property:

PropertyTypeDefaultDescription
restoreColumnPositionbooleanfalseWhen true, an unfrozen column goes back among the scrollable columns by its data source order: right after the last scrollable column that comes before it in the data source. When false, it stays right after the frozen columns. Available since 19.0.0.

Read more:

This option can only be set at the grid level. It has no effect when set in the columns, cells, or cell options.

Default: undefined
Example

// enable the `ManualColumnFreeze` plugin
manualColumnFreeze: true,
// enable the `ManualColumnFreeze` plugin, and move an unfrozen column back by its data source order
manualColumnFreeze: {
restoreColumnPosition: true,
},

Members

DEFAULT_SETTINGS

Source code

ManualColumnFreeze.DEFAULT_SETTINGS

Returns the default settings of the plugin, used when manualColumnFreeze is set to true.

LICENSE

Source code

ManualColumnFreeze.LICENSE

Returns the license token of the plugin, its display name, where it is checked, and the tokens it requires.

PLUGIN_KEY

Source code

ManualColumnFreeze.PLUGIN_KEY

Returns the plugin key used to identify this plugin in Handsontable settings.

PLUGIN_PRIORITY

Source code

ManualColumnFreeze.PLUGIN_PRIORITY

Returns the priority order used to determine the order in which plugins are initialized.

SETTINGS_VALIDATORS

Source code

ManualColumnFreeze.SETTINGS_VALIDATORS

Returns the validators of the object form of the plugin’s settings.

Methods

enablePlugin

Source code

manualColumnFreeze.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

freezeColumn

Source code

manualColumnFreeze.freezeColumn(column)

Freezes the specified column (adds it to fixed columns).

freezeColumn() doesn’t re-render the table, so you need to call the render() method afterward.

The method does nothing when the column is already frozen, when it belongs to the fixedColumnsEnd band, or, with the limitFixedToViewport option on, when one more frozen column would not fit the grid. The afterColumnFreeze hook then reports that the freeze was not performed.

ParamTypeDescription
columnnumberVisual column index.

isEnabled

Source code

manualColumnFreeze.isEnabled() ⇒ boolean

Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit hook and if it returns true then the ManualColumnFreeze#enablePlugin method is called.

unfreezeColumn

Source code

manualColumnFreeze.unfreezeColumn(column)

Unfreezes the given column (removes it from fixed columns). The column is placed right after the frozen columns, or, with the restoreColumnPosition setting, back among the scrollable columns in data order.

The method does nothing when the column is not frozen, or when unfreezing it would hand a column to the fixedColumnsEnd band. With the limitFixedToViewport option on, a column that the grid draws as scrolling counts as not frozen, and the new count is the drawn count minus one. The afterColumnUnfreeze hook then reports whether the unfreeze was performed.

ParamTypeDescription
columnnumberVisual column index.

updatePlugin

Source code

manualColumnFreeze.updatePlugin()

Updates the plugin’s state.

This method is executed when updateSettings() is invoked with any of the following configuration options: