Search code examples
mvvmkendo-uikendo-gridkendo-mvvm

Kendo UI MVVM : Change increment step of number field in grid


Does anyone know if it's possible to change the increment value of the number "spinner" in a Kendo UI grid field? I know it can be done in a stand-along numbericTextBox but I haven't been able to find any information about values inside a grid.

Ideally I'd like it so when I increment or decrement using the up and down arrows, it does so by .5 instead of 1.


Solution

  • I know this is late but for future reference, you can use the editor field for manipulating your numeric textbox.

    { 'field': 'count', title: 'Count', editor: numericEditor }
    

    In your js file, you initialize the numeric textbox

    function numericEditor(container, options) {
        $('<input type="number" data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoNumericTextBox({
                min: 1,
                step: .5,
            });
    }
    

    Here's a Dojo for demo