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, 10 months ago.
-
AuthorDestroy Grid Error Posts
-
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…I have looked into this further and it appears that the error only occurs when
filterable:trueis 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?
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 StoevjQWidgets Team
http://www.jqwidgets.comHi 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
divas it detects that it is already there)…Would you like me to try and create a jsFiddle as an example of this?
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 StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.