When needing to unload the grid, in my case because I override the colModel and colNames on the fly when the user selects to see a different table's data in the same jqGrid (I do this wil $.extend()), and you try to edit a record with the normal modal dialog, it does not change after the unload and a new jqGrid has been loaded, it keeps the modal dialog for editing of the first loaded jqGrid you tried to edit.
The solution is to remove the modal dialog after every unload:
$(item).GridUnload();
$('#editmodLookupList').remove();
//FYI – Here I reload my jqGrid
$(item).jqGrid($.extend(GetjqGridDefaultListOfLookupData(item, listURL, editURL, hideGrid, postData),customData||{}))
.navGrid(item+'Pager', {refresh: true, edit: true, add: true, del: false, search: false});
In case you are wondering, the reason I do all of this is because I use on jqGrid for all my lookup/reference tables as most of them have the same columns. I need to unload in stead of just calling trigger('reloadGrid') because the columns change.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top