jQWidgets Forums

jQuery UI Widgets Forums Grid Timing issue while editing..

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  eCandidus 12 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Timing issue while editing.. #21074

    eCandidus
    Member

    All:

    I have run into an interesting situation, where the entry on one cell calls for the update of the celll next to it via ‘cellendedit’ with an ajax call and then ‘setcellvalue’ upon success. Unfortunately, the ajax call will never be fast enough to update the data set BEFORE the editor is shown for the next cell, so the value in the editor will always be the cell value before the ajax call.

    A simple work around would be to inject the value returned by the ajax call into the editor area, but I cannot find any calls that will return the active editor and the row/column that it is applying to. Any ideas?

    Thanks

    Timing issue while editing.. #21079

    eCandidus
    Member

    Follow up:

    I added this code after line 6197 of the jqxgrid.js and it works. It is a kludge as it was written in the debugger, so I rather not keep it (also, I am trying to keep the jqx code in the original):

    }

    // ECANDIDUS 2013-05-23
    if (this.editcell && this.editcell.column == datafield && this.editcell.editor && this.editcell.editor[0]) {
    this.editcell.editor[0].value = value;
    }
    //

    if (this.source && this.source._knockoutdatasource && !this._updateFromAdapter && this.autokoupdates) {
    if (this.source._source._localdata) {

    Hope it helps….

    Timing issue while editing.. #21097

    Peter Stoev
    Keymaster

    hi,

    Please, do not post code in the Forum which is from unminified sources as this is in violation with the EULA.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Timing issue while editing.. #21143

    eCandidus
    Member

    Peter:

    Point taken and will not be repeated. Any idea on how top solve the issue?

    Timing issue while editing.. #21160

    Peter Stoev
    Keymaster

    No problem 🙂

    One possible and simple solution would be to set “async: false” in your Ajax call.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Timing issue while editing.. #21215

    eCandidus
    Member

    Peter:

    The issue is that the cellendedit event runs AFTER the editor is up and running on the next cell, so asynch:false does not make any difference. Is there any way I can detect which editor is open?

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

You must be logged in to reply to this topic.