jQuery UI Widgets Forums General Discussions JQXGrid – Decimal value not allowing to type after hit enter key

This topic contains 6 replies, has 3 voices, and was last updated by  Hristo 6 months ago.

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

  • ragavsrini
    Participant

    When I type data in the grid and hit enter, cursor navigated to next row and below cell selected. Now if I want to enter .29(decimal values start with .), not allowing to enter. But if I enter 0.29, it is allowing to enter.

    Otherwise I need to click and enter .29

    Please provide solution


    Hristo
    Participant

    Hello ragavsrini,

    I tested this demo and it seems to work fine.
    I try on both ways with “0.29” and “.29” and after I press ‘Enter’ it ends editing and goes to the next cell.
    Could you clarify it?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    ragavsrini
    Participant

    Hello Hristo,

    Very first time I am able to enter .29 directly and hit enter,

    After hit enter it will go next cell, then if we try type .29 not allowing.

    basically on cell select i am able to enter alpha + numeric values like 0 to 9 and A to Z but it won’t allow if i will try to press .29.
    that’s what i mentioned it allow me to enter 0.29 on cell select but i can’t enter .29 directly on cell select.

    And you are recommending on cell edit mode where all the keys are working, hope now you understood my issue. please address me if you have any solution for it.

    Regards
    Srini

    • This reply was modified 6 months, 3 weeks ago by  ragavsrini.

    Hristo
    Participant

    Hello Srini,

    Thank you for this clarification.
    When you start typing on a selected value it should go into the edit mode and after that, you could type .” symbol.
    For this purpose you could change the editmode or another option will be to implement the handlekeyboardnavigation callback.
    In the case when the user types some symbol you could recognize (in the callback) and then use the begincelledit method and set the wanted value into the cell – 0. after that the cursor.
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    ragavsrini
    Participant

    Thanks Hristo.


    mohit jariwal
    Participant

    Hi Hristo,

    I set the same as you explained above, But i found first time while i am clicking on the cell for selection i need to type decimal twice. while i am typing first time it became editable and after editable i can type there decimal (.) whereas i need like common key functionality. here we can do 2 things.

    1. we can remove the restrictions from jqxgrid.edit.js file. if possible then please provide us the file. Also, we are the existing paid customer.
    2. I have written code under handlekeyboardnavigation for make it editable which is working like mentioned above.

    handlekeyboardnavigation: function (event) {
    if (event.keyCode == 110) {
    var cell = $(gridID).jqxGrid(‘getselectedcell’);
    currRow = cell.rowindex;
    var datafield = cell.datafield;
    $(gridID).jqxGrid(‘begincelledit’, currRow, datafield);
    }
    }

    Please let me know how i can fix it.

    FYKI my grid property

    selectionmode: ‘multiplecellsadvanced’,
    editmode: ‘selectedcell’,


    Hristo
    Participant

    Hello mohit jariwal,

    As it is mentioned above you could try with another “editmode” – click or programmatic.
    The second one provides this – cell editors are activated and deactivated only through the API (see begincelledit and endcelledit methods).
    If you make it with the ‘programmatic’ approach you should focus this input in the cell and/or set the caret position.
    In a case where start with typing “.” then you should set their initial value as “0.” and after that should wait for the next typed value.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.