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]
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
Property | Type | Description |
---|---|---|
addString | string | String appended with multipleChar |
blankWithSpace | boolean | Whether to allow space input with the space bar key |
delay | number | Specifies the speed at which the value changes while the button is pressed. |
direction | string | Arrange buttons vertically or horizontally. |
editFormat | string | Format of entered numbers |
integerOnly | boolean | Whether to allow input of only integer values |
max | number | Enter the maximum value. |
maxIntegerLength | number | Allowable input digits |
maxLengthExceptComma | boolean | Whether to set the maximum input length excluding commas (,) |
min | number | Enter the minimum value. |
multipleChar | string | Character key corresponding to addString |
positiveOnly | boolean | Whether to allow only positive values to be entered |
showStepButton | boolean | Whether to display the step button |
step | number | Enter the value to be added or subtracted when the button is clicked. |
textReadOnly | boolean | Whether 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"