jQWidgets Forums

jQuery UI Widgets Forums Grid Grid geteditorvalue is still called if you press escape

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

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

  • ajcs
    Participant

    When using custom editors and you press escape it should abandon the changes but it is still calling geteditorvalue.

    In geteditorvalue I am updating some other columns because there are field dependencies. I don’t know escape has been pressed so these other fields are being updated wrongly.

    Why is it calling geteditorvalue when escape it pressed?

    I saw a post from 2016 that said this issue was fixed in a newer version but I am using the latest version from a week ago.


    Hristo
    Participant

    Hello ajcs,

    Whatever happens, the geteditorvalue callback is invoked.
    It should set some value no matters you press the Esc button.
    Could you clarify it?
    It will be better if you could provide us with one simplified example that demonstrates your case.
    If you want to change the value after editing you could check the cellendedit callback.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    ajcs
    Participant

    When that cell value is changed there is other logic in the data which means other fields on that row need to change but obviously don’t want to change the other fields if the cell has not really changed because the user presses ESCAPE. So if they press ESCAPE it still calls geteditorvalue and cellendedit.

    So currently I am incorrectly changing other fields in the data base on a change that will not happen.

    Does it pass a parameter to either of those callbacks to say the edit has been cancelled? Or is there another event saying edit was cancelled?


    Hristo
    Participant

    Hello ajcs,

    You could use the updaterow callback of the jqxDataAdapter‘s source” object.
    More details about this you could find in this article:
    https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm
    You could use this commit(false); option.
    If this does not help you, please, provide us with more details – one simplified example of your case will be better to understand you well.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.