RealGrid2 API
Interface
ButtonCellRenderer

ButtonCellRenderer

A renderer that displays a button

Signature:

export interface ButtonCellRenderer extends CellRenderer

Extends: CellRenderer

Remarks

TOP_EDGE and BOTTOM_EDGE cannot be used in auto height.

[Superclass]

CellRenderer

Example

//string type
column.renderer = 'button';
 
//object type
column.renderer = {
      "type": "button",
      "hideWhenEmpty": false
}

Properties

PropertyTypeDescription
buttonStylestringStyle class name of the displayed button
enterKeybooleanWhether button.click is executed when enter is entered
hideWhenEmptybooleanWhether to display the button when the value is empty
spaceKeybooleanWhether to execute button.click when spaceKey is entered
type'button'Type: Button

Properties Desc

buttonStyle

Style class name of the displayed button

Type - string


enterKey

Whether button.click is executed when enter is entered

Type - boolean

Remarks:

If true, button.click is executed when the enterKey is entered. If there is GridBase.onCellItemClicked, the default action is not executed if the result is false after the event is called.


hideWhenEmpty

Whether to show the button when the value is empty

Type - boolean

Remarks:

When true, undefined, null, '', NaN, the button is not displayed.


spaceKey

Whether button.click is executed when spaceKey is entered

Type - boolean

Remarks:

If true, button.click is executed when the space bar is entered. If there is GridBase.onCellItemClicked, the default action is not executed if the result is false after the event is called.


type

Type: Button

Type - 'button'