v7.3.0

NumberColumn

A column for showing/editing numbers.

Default editor is a NumberField.

new Grid({
    appendTo : document.body,
    columns : [
        { type: 'number', min: 0, max : 100, field: 'score' }
    ]
});

Provide a NumberFormat config as format to be able to show currency. For example:

new Grid({
    appendTo : document.body,
    columns : [
        {
            type   : 'number',
            format : {
               style    : 'currency',
               currency : 'USD'
            }
        }
    ]
});

Useful configs

Config Description
format Number format string or config object
min Minimum allowed value
max Maximum allowed value
step Spin step amount

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Large step size, defaults to 10 * step. Applied when pressing SHIFT and stepping either by click or when using the Up/Down keys.

    Has a corresponding runtime largeStep property.

  • The maximum value for the field used during editing.

    Has a corresponding runtime max property.

  • The minimum value for the field used during editing.

    Has a corresponding runtime min property.

  • Step size for the field used during editing. Also used when pressing up/down keys in the field.

    Has a corresponding runtime step property.

  • Unit to append to displayed value.

    Has a corresponding runtime unit property.

  • align : 'left'/'center'/'right'/'start'/'end''end'

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding runtime align property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • Large step size, defaults to 10 * step. Applied when pressing SHIFT and stepping either by click or when using the Up/Down keys.

    Has a corresponding largeStep config.

  • The maximum value for the field used during editing.

    Has a corresponding max config.

  • The minimum value for the field used during editing.

    Has a corresponding min config.

  • Step size for the field used during editing. Also used when pressing up/down keys in the field.

    Has a corresponding step config.

  • Unit to append to displayed value.

    Has a corresponding unit config.

  • isNumberColumn : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of NumberColumn class, or subclass thereof.
  • align : 'left'/'center'/'right'/'start'/'end''end'

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding align config.

Functions

Functions are methods available for calling on the class
    type: number

    Source path

    Grid/column/NumberColumn.js

    Contents