jQWidgets Forums

jQuery UI Widgets Forums Grid BUG: programmatic editmode not respected

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

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

  • pk
    Participant

    As per the documentation “‘programmatic’ – Cell editors are activated and deactivated ONLY through the API(see begincelledit and endcelledit methods)”
    So, if I set this, I expect the grid to stop editing only when I tell it to.
    However, cell editing stops whenever you click anywhere.

    Fiddle: http://jsfiddle.net/5xqjtaz2/
    Double click on a cell to begin editing, and then click the button “Click me”. Cellediting stops.


    admin
    Keymaster

    Hi pk,

    Editing always ends when you click outside the editor. This is a mistake in the description of the “programmtic” mode in the docs.

    Regards,
    Peter Stoev


    pk
    Participant

    Hello Peter,
    In my opinion, this shouldn’t happen. Consider this (my scenario):
    A column is set to “custom”, with custom cell editor and rendering. I’ve implemented all three needed functions (cellsrenderer, createeditor, getEditorValue). As soon as I trigger cell editing, I display a popup. This popup needs a series of clicks to select the final value that will go into the cell. But I can’t do that, because once I click something, cellendediting triggers.

    It’s a simple fix: on the “mousedown.gridedit” handler, you already check if grid is editable, and if grid has triggered begincelledit.
    If you also check that the editmode is NOT programmatic, it’s fixed.

    Like this (jqxgrid.js):

    e.addHandler(b(document), "mousedown.gridedit" + e.element.id, function(m) {
    if (e.editable && e.begincelledit && (e.editmode!="programmatic")) {

    Anyway, that’s just my 2 cents.

    Hi,

    Thank you for the suggestion, an issue has been just opened.
    If you need any additional help, do not hesitate to contact us!

    Best regards,
    Svetoslav Borislavov

    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.