RealGrid2 API
Interface
CellEditor

CellEditor

Model on which cell editors are based

Signature:

export interface CellEditor

Remarks

There are properties that can be specified for each cell editor, and if not specified in DataColumn, LineCellEditor is set as default.

Additionally, the type property in object form can be specified in the form of a string in column.editor.

[List]

LineCellEditor: One-line input editor

PasswordCellEditor: Password input editor

MultiLineCellEditor: Multi-line input editor

NumberCellEditor: Number input editor

DateCellEditor: Date editor

BTDateCellEditor: Bootstrap date editor.

DropDownCellEditor: Drop down editor

SearchCellEditor: Drop-down editor with added search functionality

MultiCheckCellEditor: Drop-down editor with multiple selections

Example

//string type
column.editor = "line"
 
//object type
column.editor = { type: "line", maxLength: 1}

Properties

PropertyTypeDescription
booleanFormatstringFormat of the editor displayed when the value is Boolean
datetimeFormatstringFormat of the editor displayed when the value is in date format
emptyValueanyValue saved when a cell is blank after removing or editing its value
nowCharstring(ALPHA) The character that corresponds now when entered into the editor
readOnlybooleanWhether the value of a data cell can be modified
textCaseTextInputCaseCase-sensitive type of characters entered into the editor
todayCharstringcharacter that causes the editor to enter the current date
typestringCell Editor Types

Properties Desc

booleanFormat

Formatting of the editor displayed when the value is a Boolean

Type - string

Remarks:

Operates when the data field is boolean type.


datetimeFormat

Formatting in the editor that appears when the value is in date format.

Type - string

Remarks:

Works when the data field is of date type


emptyValue

Value saved when a cell's value is removed or left blank after editing

Type - any


nowChar

The character that corresponds now when entered into the editor

Type - string

Remarks:

This works when the data field is a date type or the editor is a date editor.


readOnly

Whether the value of a data cell can be modified

Type - boolean

Remarks:

When true


textCase

Case-sensitive form of characters entered into the editor

Type - TextInputCase

Remarks:

Characters entered into the editor are automatically changed to lowercase and lowercase. If you specify TextInputCase.DEFAULT, the value specified in the textInputCase of the column will be followed.


todayChar

A character that causes the editor to enter the current date

Type - string

Remarks:

This works when the data field is a date type, or is a text type but is a date editor.


type

Cell editor types

Type - string

Remarks:

LineCellEditor: "line" or "text"

PasswordCellEditor: "password"

MultiLineCellEditor: "multiline"

NumberCellEditor: "number"

DateCellEditor: "date"

BTDateCellEditor: "btdate"

DropDownCellEditor: "dropdown" or "list"

SearchCellEditor: "search"

MultiCheckCellEditor: "checklist"