v7.3.0

CheckColumn

A column that displays a checkbox in the cell. The value of the backing field is toggled by the checkbox.

Toggling of the checkboxes is disabled if a record is readOnly or if the CellEdit feature is not enabled.

This column renders a Checkbox into each cell, and it is not intended to be changed. If you want to hide certain checkboxes, you can use the renderer method to access the checkbox widget as it is being rendered.

It is mandatory to configure this column with a field (except when this column is used as a selection column, then no field should be provided). This is because the checked/unchecked state needs to be backed up in a record since rows are recycled and the state will be lost when a row is reused.
new Grid({
    appendTo : document.body,

columns : [ { type: 'check', field: 'allow', // In the column renderer, we get access to the record and CheckBox widget renderer({ record, widgets }) { // Hide checkboxes in certain rows widgets[0].hidden = record.readOnly; } } ] });

Useful configs

Config Description
field Data field holding the boolean value
showCheckAll Show a select-all checkbox in the header
checkCls CSS class for the checkbox

See also

  • WidgetColumn - Parent column that renders widgets
  • Checkbox - The checkbox widget rendered in cells
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class
type: check

Source path

Grid/column/CheckColumn.js

Contents