jQWidgets Forums

jQuery UI Widgets Forums Grid How to commit cell edit on focus lost with editmode=dblclick

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 9 years, 1 month ago.

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

  • sirstruck
    Participant

    When I use “dblclick” for a grid’s editmode, cell edits are not committed when the editing cell loses focus if you click elsewhere in the grid. Note that the cell edits *are* committed if you click outside the grid.

    JSFiddle

    I should also point out that I’m using the default “singlerow” for the grid’s selectionmode. A quick scan of the grid widget’s source makes it seem that may also be a factor.

    Thanks,

    David


    Hristo
    Participant

    Hello David,

    This is normal behavior of the Grid.
    You could accidentally click on another cell and for that reason the cell is still in editmode.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    sirstruck
    Participant

    Hi Hristo, it seems to be inconsistent though. This JSFiddle is identical to the previous one except I changed the editmode to “selectedcell”. Now when I click on another cell, the edit completes. It sounds like ultimately though I’m going to need some sort of custom solution.

    Thanks,

    David


    Hristo
    Participant

    Hello David,

    Thank you the interest to our widget. This is correct behavior.
    The “editmode” property:
    ‘click’ – Marks the clicked cell as selected and shows the editor. The editor’s value is equal to the cell’s value
    ‘selectedcell’ – Marks the cell as selected. A second click on the selected cell shows the editor. The editor’s value is equal to the cell’s value
    ‘selectedrow’ – A second click on a selected row shows the row editors.
    ‘dblclick’ – Marks the clicked cell as selected and shows the editor. The editor’s value is equal to the cell’s value
    ‘programmatic’ – Cell editors are activated and deactivated only through the API(see begincelledit and endcelledit methods)

    If you would like to use something special could use that option – programmatic.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.