jQWidgets Forums

jQuery UI Widgets Forums Grid begincelledit after window close

This topic contains 3 replies, has 2 voices, and was last updated by  ales 11 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • begincelledit after window close #55774

    ales
    Participant

    Suppose there is grid with special cell editor with “…” button. When the button is clicked, a window is opened and user select a value from it, confirms the window and the selected value is copied to the cell. This works fine. But when user decides not to select any value and uses Esc key to close the window, the cell is not in edit mode anymore. What should I do to begin cell edit again?

    I have tried the on close method of the window

    $("#selectWindow").on('close', function (event) {
        var cell = $('#Main_jqxGrid').jqxGrid('getselectedcell');
        $('#Main_jqxGrid').jqxGrid('begincelledit', cell.rowindex, cell.datafield);
    });

    but this does not work. The begincelledit works normally in other circumstances.

    begincelledit after window close #55780

    ales
    Participant

    Or maybe it would be sufficient if the cell editor stays visible during the window open/close period. But how to achieve that?

    begincelledit after window close #55787

    Peter Stoev
    Keymaster

    Hi ales,

    According to me, “begincelledit” is called and the editor is closed a little after that because of the pressed Esc key which by default closes any opened editor, too. This means that if you call “begincelledit” within setTimeout function, it will do the job, because the editor would be already closed when you call it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    begincelledit after window close #55790

    ales
    Participant

    You are right and it works now. Thank you! I was really a puzzle for me, because I thought that the Esc key was consumed by the window.

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

You must be logged in to reply to this topic.