jQWidgets Forums

jQuery UI Widgets Forums Grid editable cell needs two key press to enter editmode

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 9 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • omargarro
    Participant

    I have my grid with one of its column being editable.

    This column contains float values so when user needs to edit a value, a jqxNumberInput is invoke like this:

    { text: 'Weight', datafield: 'dbWeight', width: 110, cellsalign: 'right', cellsformat: 'd2', columntype: 'numberinput',
                  validation: function (cell, value) {
                        if (value < 0 || value > 1500) {
                        	return { result: false, message: "Value should be in the 0-1500 interval" };
                         }
                         return true;
                  },
                  createeditor: function (row, cellvalue, editor) {
                        editor.jqxNumberInput();
                  }
    			}

    Problem: If I need to enter, let’say, the value “1430” when I type the first key ( “1” ) the editor is invoked and the text on it is selected. But the number 1 is not reflected on the input. Then, I press the second key ( “4” ) and this one is rendered ok. And so on with the third key (3) and fourth (0).
    Result is: 430 on the editor instead 1430

    How can I fix this behaviour ?

    (by the way… Grid selectionmode is ‘multiplecellsadvanced’ )


    ivailo
    Participant

    Hi omargarro,

    Please, use editmode: 'selectedcell',.
    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.