1
votes

I'm using jqGrid v4.5.2 (the latest at time of writing), with jQuery 1.9.1. The jqGrid method GridUnload doesn't appear to work. It worked in v3.8.1 (see this example from another thread about jqGrid GridUnload), but using that exact same code with the latest jqGrid, it doesn't (even using jQuery 1.4.4 which is what was used in that example).

FireFox's error console reports "No such method: GridUnload". Which implies the method has been removed from the later jqGrid, but there's no mention of that in the jqGrid release notes here.

I can't revert back to earlier jqGrid versions without also reverting jquery to pre 1.9.x, which breaks the functionality of other parts of my code.

Any ideas if GridUnload has been removed from the latest jqGrid, or replaced by some other method?

2
I look at the code on github and exist; can you provide a demo on jsfiddle? Works here: jsfiddle.net/IrvinDominin/pnYMc - Irvin Dominin
Ah, found the problem - it appears the GridUnload and GridDelete methods are "additional methods" and you have to have those checked when downloading the jqGrid code. I'd obviously unchecked Additional Methods when downloading. Would be helpful if the website mentioned exactly what methods were covered (though I see it does say in the comments "destroying, unloading"). - Nick Shaw
So you not have the complete jqGrid script, but a "custom" without the additionals methods they are: "This module provide additional grid methods like: destoying, unloading, accesing and setting column properties, creation of custom form search and toolbar search" - Irvin Dominin

2 Answers

2
votes

Please use the method below for unloadGrid.

$.jgrid.gridUnload("#ctrl_editor_table");

ctrl_editor_table is the ID of you grid table. This will work in jqGrid 4.0 and above versions.

0
votes

Problem was as I described in the comments to the question: I appeared not to have download jqGrid with the Additional Methods included, which include GridUnload and GridDelete. Having downloaded a copy with those included, it now works.