SMART datagrid v1.4 > Classes

Back  Forward

DataLudi.NumberCellEditor  class

숫자를 입력 받는 셀 편집기다. 

기본적으로 숫자들과 ',', '.', '+', '-', 'e', 'E' 문자들만 입력 가능하도록 제한된다. positiveOnly, maxDigits 속성 등을 설정하면 좀 더 제한할 수도 있다. 

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
TextCellEditor.ctor
CellEditor.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 셀 편집기
셀 편집