Forum



06:50

12/04/2010

Ok, I must be doing something fundamentally wrong. I am trying to get either GridDestroy or GridUnload to work. I have a grid that has been previously loaded with data. On the screen, I have a 'button' that is supposed to clear the grid. I have tried each method two different ways:
and
But niether one works. I am watching my firebug output. But my grid data and build remains after I click on my button.
Here is my code, most of the actions are commented out cuz I am having problems getting the grid data to clear or be destroyed:
// var munitionType = jQuery('#searchResults').jqGrid('getGridParam','xmlReader:row');
// if (jQuery('#searchResults').children().length > 0) { grid already built
// if (munitionType == 'chem') { // checks for correct munitions group xml file loaded
// jQuery("#searchResults").jqGrid('setGridParam',{url:"weaponLib/chem_riot.xml"}).trigger("reloadGrid");
// }
// else {
// alert('grid loaded but wrong munitions group xml loaded');
jQuery('#searchResults').GridDestroy(); // destroys the grid
//jQuery("#searchResults").jqGrid('setGridParam',{url:"weaponLib/chem_riot.xml"}).trigger("reloadGrid");*/
// }
// }
// else {
// alert("grid not built");
//build a brand new grid from scratch
// }
});
Any suggestions would be helpful.
Tony
19:28

16/03/2011

Hi! Likely you downloaded cut version of plugin - you should check 'Additional methods' when do it (see jQuery Grid Plugin Download).
Most Users Ever Online: 715
Currently Online:
80 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66