SMART datagrid v.1 > Classes > NumberCellEditor

Back  Forward

DataLudi.NumberCellEditor.positiveOnly  property

If it is true, it will stop to input '-' character to make the input value be a positive number. 

When the editor is being displayed, it will not force to update the existing text. 

Defaults to false.

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