Skip to main content

cell.registry

TableCellRegistry : d2/sdk/controls/table/cells/cell.registry

Register a new cell renderer, to be used for a specified column in a TableView or against a particular data type.

Extends: Object

TableCellRegistry.registerByColumnKey(columnKey, handlerClass) ⇒ void

Register a cell renderer by column key, i.e. an attribute name

Kind: static method of TableCellRegistry

ParamTypeDescription
columnKeystring

Attribute name to bind this renderer to

handlerClassTemplatedCellView

View class implementing the renderer

TableCellRegistry.registerByDataType(dataType, handlerClass) ⇒ void

Register a renderer by data type

Kind: static method of TableCellRegistry

ParamTypeDescription
dataTypenumber

A non-zero number to represent a data type. Pre-declared types are -1(string), -4(double), -7(date), 2(integer), 5(boolean).

handlerClassTemplatedCellView

View class implementing the renderer