v7.3.0

TemplateColumn

A column that uses a template for cell content. Any function can be used as template, and the function is passed { value, record, field } properties. It should return a string which will be rendered in the cell.

Default editor is a TextField.

new Grid({
    appendTo : document.body,

columns : [ { type: 'template', field: 'age', template: ({value}) => `${value} years old` } ] });

Useful configs

Config Description
template Function returning cell HTML content

See also

  • Column - Base column class and its renderer config
  • WidgetColumn - Column with interactive widgets
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

Functions

Functions are methods available for calling on the class
    • defaultRenderer( )
      private

      Renderer that uses a template for cell content.

    type: template

    Source path

    Grid/column/TemplateColumn.js

    Contents