jQuery UI Widgets Forums Grid jqxGrid throws exception on destroy in angular

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 9 years, 5 months ago.

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

  • Sunil Ramesh
    Participant

    Hi,

    jqxGrid throws exception on destroy in angular

    I have two div’s in an angular view and under one I have jqxGrid.
    <div id=”div1″ ng-show=”pkgCtrl.view == ‘details'”>

    </div>
    <div id=”div2″ ng-show=”pkgCtrl.view != ‘details'”>
    <jqx-grid id=”rule-grid{{tab.key}}” jqx-settings=”ruleGridSettings”></jqx-grid>
    </div>

    The div under which jqxGrid is not visible. It is supposed to be toggled based on user input. Basically, when the view is shown to the user the jqxGrid is not initialized yet.

    When user navigates away from the view, jqxangular tries to destroy the grid that is not yet initialized and throws exception for the following lines

    this.columnsheader.remove();
    delete this.columnsheader;

    this.selectionarea.remove();
    delete this.selectionarea;

    this.gridcontent.remove();
    delete this.gridcontent;

    if we enclose them as below then the exceptions are not seen

    if(this.columnsheader){
    this.columnsheader.remove();
    delete this.columnsheader;
    }

    if(this.selectionarea){
    this.selectionarea.remove();
    delete this.selectionarea;
    }

    if(this.gridcontent){
    this.gridcontent.remove();
    delete this.gridcontent;
    }

    Also, under jqxangular.js, this function goes into an infinite loop.

    if (E === “jqxGrid” || E === “jqxDataTable”) {
    var Y = 0;
    var Z = v(function () {
    if (h(L).data().jqxWidget.initializedcall || Y == 25) {
    v.cancel(Z);
    Z = i;
    X()
    }
    Y++
    }, 100)
    } else {
    X()
    }

    if we change the condition as below it resolves the issue.
    if (h(L).data().jqxWidget && h(L).data().jqxWidget.initializedcall || Y == 25) {

    }

    It will not throw any of these exceptions if the 2nd div was visible and the the grid was initialized while the user is navigating away from the view.

    Thanks & Regards
    Sunil Ramesh


    Peter Stoev
    Keymaster

    Hi Sunil Ramesh,

    Ok. We will test this and in case we reproduce it, we will add a work item for future release.

    Best Regards,
    Peter Stoev

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


    Speedy Gonzales
    Participant

    Hello,

    we have the same issue over here. The suggestion of Sunil Ramesh fixes the problem. We adjusted the jqxangular.js accordingly, however every Bower update enforces us to edit the code again. Will this be integrated into the next (or one of the next) releases?

    Thanks and best regards,
    Speedy


    Peter Stoev
    Keymaster

    There is no such issue in the current version!

    Best Regards,
    Peter Stoev

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

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

The topic ‘jqxGrid throws exception on destroy in angular’ is closed to new replies.