jQWidgets Forums

jQuery UI Widgets Forums Grid Grid still in edit mode, after lost focus

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid still in edit mode, after lost focus #60168

    nkapralos
    Participant

    I am evaluating the jQWidgets for a new web application project I am currently working on.
    I have just come up with the following issue when using the jqxGrid control:
    I put two jqxGrids in a web page, along with other form (standard input) controls. The two grids are editable with { editmode: ‘selectedrow’, selectionmode: ‘singlerow’ }. I edit one cell value (default editor is a textbox) in the first grid and without pressing “Enter” or “Esc”, or clicking on another row inside the grid, I edit a cell value in the other grid. Then I click on another input control on the page.
    The two grids are in a “semi-editing” state now. The edited rows have a blue border around them. Using JS console.log() I can see that a ‘cellbeginedit’ event has been triggered for each one of the grids, but no ‘cellendedit’ events are fired! If I hit “Enter” or “Esc” now (with the focus still on the third control), both grids are back in row-selection mode and their new values are either committed or discarded. Furthermore, the two ‘cellendedit’ events are now fired.
    I just wanted to know if this behavior is by design or I am missing something. I would expect that since a grid cell editor gets out of focus (‘onblur’ or ‘onfocusout’ event), its new value should be either committed or discarded, without any further action required by the user. I read the following in the jqGrid demo page:

    To cancel the cell editing, press the “Esc” key. To save the changes press the “Enter” key or select another Grid cell.

    But what about selecting another control on the page?
    Thank you for your time.

    Grid still in edit mode, after lost focus #60187

    Peter Stoev
    Keymaster

    Hi nkapralos,

    If you need to end the editing process, call the endrowedit method when you are using the widget in row edit mode or endcelledit in cell edit mode. Example: http://jsfiddle.net/jqwidgets/6Lm7S/

    Best Regards,
    Peter Stoev

    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.