RealGrid2 API
Interface
NumberCellEditor

NumberCellEditor

An editor that allows you to enter only numbers, punctuation, and symbols

Signature:

export interface NumberCellEditor extends CellEditor

Extends: CellEditor

Remarks

Inherits CellEditor.

You can use editFormat to display thousands symbols or limit the number of decimal places when inputting.

[Superclass]

CellEditor

Example

//string type
column.editor = "number"
 
// object type
column.editor = { type: "number", positiveOnly: true};
 
// Enter only integers
column.editor = {type:"number", editFormat:"#,##0"}
 
// Enter only 2 decimal places
column.editor = {type:"number", editFormat:"#,##0.00"}

Properties

PropertyTypeDescription
addStringstringString appended with multipleChar
blankWithSpacebooleanWhether to allow space input with the space bar key
delaynumberSpecifies the speed at which the value changes while the button is pressed.
directionstringArrange buttons vertically or horizontally.
editFormatstringFormat of entered numbers
integerOnlybooleanWhether to allow input of only integer values
maxnumberEnter the maximum value.
maxIntegerLengthnumberAllowable input digits
maxLengthExceptCommabooleanWhether to set the maximum input length excluding commas (,)
minnumberEnter the minimum value.
multipleCharstringCharacter key corresponding to addString
positiveOnlybooleanWhether to allow only positive values to be entered
showStepButtonbooleanWhether to display the step button
stepnumberEnter the value to be added or subtracted when the button is clicked.
textReadOnlybooleanWhether to allow input using the keyboard
type"number"Cell Editor Type: Number

Properties Desc

addString

String appended with multipleChar

Type - string


blankWithSpace

Whether to allow space input with the space bar key

Type - boolean


delay

Specifies the speed at which the value changes while the button is pressed.

Type - number


direction

Arrange buttons vertically or horizontally.

Type - string


editFormat

Format of numbers entered

Type - string

Remarks:

If you specify "#,##0.##", the thousands separator , is displayed, as in "1,234,567.89", and only 2 decimal places are entered.

If the thousands separator and decimal point used in some countries are reversed, "#,##0.##;,;." Designate as

For the format displayed on the screen, see ValueColumn.numberFormat.


integerOnly

Whether to allow input of only integer values

Type - boolean


max

Enter the maximum value.

Type - number


maxIntegerLength

Allowable input digits

Type - number

Remarks:

If 0 is entered, there is no limit.


maxLengthExceptComma

Whether to set the maximum input length excluding commas (,)

Type - boolean


min

Enter the minimum value.

Type - number


multipleChar

Character key corresponding to addString

Type - string


positiveOnly

Whether to allow only positive values to be entered

Type - boolean


showStepButton

Whether to display the step button

Type - boolean


step

Enter the value to be added or subtracted when the button is clicked.

Type - number


textReadOnly

Whether input using the keyboard is allowed

Type - boolean


type

Cell Editor Type: Number

Type - "number"