jQWidgets Forums

jQuery UI Widgets Forums Grid Destroy Grid Error

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Destroy Grid Error #54838

    Benji6996
    Participant

    I have an application that can have multiple grids on the screen at any one time. One of which is within a CSS popup.

    None of the above is actually relevant (I don’t think). So all of my grids work absolutely fine apart from the one within my popup (not a new window). When I try to remove the grid using $("#some_grid").jqxGrid('destroy');, I get weird errors.

    If I remove it using the ESC key then I get:

    Uncaught TypeError: Cannot read property ‘css’ of undefined

    Whereas, if I remove it by pressing one of my buttons, I get the error:

    Uncaught TypeError: Cannot read property ‘coord’ of undefined

    Can you think of anything that could be causing this? The grid still gets removed but I can still see that some resources and div‘s are left behind within the DOM…

    Destroy Grid Error #54841

    Benji6996
    Participant

    I have looked into this further and it appears that the error only occurs when filterable:true is specified. I think this may be the same issue as: http://www.jqwidgets.com/community/topic/maybe-a-bug-in-destroy-method-when-using-filtering/

    Is there a solution yet?

    Destroy Grid Error #54861

    Peter Stoev
    Keymaster

    Hi Benji6996,

    This has been already resolved in jQWidgets 3.2.2. Please, check on your side whether you use the same. Alternatively, you may use $(“#jqxGrid”).remove();

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Destroy Grid Error #54942

    Benji6996
    Participant

    Hi Peter,

    Thank you for getting back to me. I updated to 3.2.2 thinking that would probably sort it but unfortunately it hasn’t…

    When I run $('#some_grid').jqxGrid('destroy');, I am still receiving the error: Uncaught TypeError: Cannot read property ‘coord’ of undefined…

    The ‘destroy’ method succeeds in removing the grid, but it seems to leave the code for the filter popup. So, when I create the grid again, there is duplicate code throughout the DOM (the duplicate code bug is fixed in version 3.2.2, as in, it doesn’t create another div as it detects that it is already there)…

    Would you like me to try and create a jsFiddle as an example of this?

    Destroy Grid Error #54945

    Peter Stoev
    Keymaster

    Hi Benji6996,

    No, I don’t need a fiddle. In addition, 3.2.2 is no longer the current version as well.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.