SpreadsheetColumn extends TableColumn
The configuration class for Spreadsheet columns
Example
Spreadsheet.columnTypeRegistry.foo = class FooColumn extends SpreadsheetColumn {
...
}
new Spreadsheet({
data: [...]
columns: [{ type: 'foo' }]
})Constructor
new SpreadsheetColumn(options)
options
:
Object
optionalheaderEditable
:
boolean
optionalallow header to be changed, fires events when changed
type
:
string
optionalKey into Table.columnTypeRegistry that determines which column class to instantiate. Defaults to "default".
frozen
:
boolean
optionalMake column stay in place when table body scrolls
class
:
string
optionalclasses to append to header and cells (space separated)
render
:
function
optionalRender method for the cell. Receives (record, cell, columnConfiguration, table)
header
:
function
|
string
optionalRender method for the header. Receives (columnConfiguration, table)
splitInto
:
function
|
string
optionalsplit cell into multiple rows by the result of this method. If String, key is called on record. If Function, function is called with record as argument.
Column attribute changes fire cancellable events on the parent Table:
headerChange/headerChanged— when the header value changesindexChange/indexChanged— when the column index changeswidthChange/widthChanged— when the column width changes
Call event.preventDefault() on the pre-action event to cancel default behavior.