SMART datagrid v.1 > Classes

Back  Forward

DataLudi.NumberCellEditor  class

It is the cell editor which receives number input. 

It basically limits to only input numbers and ',', '.', '+', '-', 'e', 'E' characters. If set positiveOnly, maxDigits properties, it will limit a little more. 

Base Classes
TextCellEditor > CellEditor > EventAware > DLBase
Constructor
function NumberCellEditor (grid: GridBase, parentElement: HTMLElement);
Properties
checkMaxValue
maxDigits
maxValue
minValue
positiveOnly
scientific
Inherited Properties
CellEditor.booleanFormat
CellEditor.datetimeFormat
CellEditor.emptyValue
CellEditor.fontName
CellEditor.fontSize
CellEditor.keyCallback
TextCellEditor.maxLength
TextCellEditor.minLength
TextCellEditor.noHangul
TextCellEditor.text
CellEditor.textCase
Inherited Methods
EventAware.addListener
DLBase.assign
CellEditor.ctor
TextCellEditor.ctor
DLBase.getProperties
DLBase.getProperty
EventAware.removeListener
DLBase.setProperties
DLBase.setProperty
DLBase.toggle

 

Code -1
    var columns = [{
        name: "Quantity",
        fieldName: "Quantity",
        width: "100",
        editor: {
            type: "number",
            positiveOnly: true,
            maxValue:1000,
            minValue:50,
            emptyValue: 0,
            checkMaxValue: true
        }
    },
    ...
    ];
    grid.setColumns(columns);
See Also
DateCellEditor
Examples
Number Cell Editor
Cell Editing