<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: GridDestroy/GridUnload examples</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>lgframe on GridDestroy/GridUnload examples</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples#p28433</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples#p28433</guid>
        	        	<description><![CDATA[<p>I have similar issues while using it with<strong> JQuery Mobile.</strong></p>
<p>Grid &#160;does not refresh the data properly(it only display few coloumn) once I<strong> revisit</strong> code with new data for the grid</p>
<p><em>Note that I display grid propery first time.</em></p>
<p><strong>calling &#160;a method to create a grid as follows:</strong></p>
<p>createGrid();</p>
<p>$("#grid").trigger("reloadGrid"); // id "grid" defined for &#60;table id=grid&#62;</p>
<p>$.mobile.changePage( $page, options );								createGrid();</p>
<p><strong>and method, as follows:</strong></p>
<p>var createGrid = function displayGrid(){</p>
<p>jQuery(&#39;#grid&#39;).jqGrid({</p>
<p>"jsonReader":{"repeatitems":false,"subgrid":{"repeatitems":false}},</p>
<p>"datatype":"local",</p>
<p>data:sortedMyInfluAarry,<br />"gridview":true,</p>
<p>.............</p>
<p>...........</p>
<p>colNames:[, , , , , , , ],</p>
<p>"colModel":[ , , , , , &#160;,]</p>
<p>});</p>
<p>}</p>
]]></description>
        	        	<pubDate>Tue, 12 Mar 2013 20:15:42 +0200</pubDate>
        </item>
        <item>
        	<title>Energetic Pixels on GridDestroy/GridUnload examples</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples#p19966</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/griddestroygridunload-examples#p19966</guid>
        	        	<description><![CDATA[<p>I have some website buttons that are controlling how jqGrid gets called.&#160; Each button group is calling jqgrid with slightly different colModel and onSelectRow operations.&#160; What I am trying to find is a real example where someone has used GridDestroy.</p>
</p>
<p>In my html source document, I have:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7836' value='Select Code' data-codeid='sfcode7836' /></p>
<div class='sfcode' id='sfcode7836'>&#60;div id=&#39;theGrid&#39;&#62;<br />&#160;&#160; &#60;table id=&#39;searchResults&#39;&#62;&#60;/table&#62;<br />&#160;&#160; &#60;div id=&#39;gridNavBar&#39;&#62;<br />&#60;/div&#62;</div>
</p>
<p>If I use GridUnload, it kills the dynamically generated grid with accompanying data.&#160; You can reload the grid but only if you don&#39;t change the column model.&#160; Cool.</p>
</p>
<p>But with GridDestroy, as I read it in the jqGrid documentation, goes deeper than &#39;Unload&#39; in that it would remove my table id=&#39;searchResults&#39; and my div id=&#39;gridNavBar&#39; from the DOM.&#160; And according to the documentation, it also unhooks my jqGrid functionality that was connected to my id &#39;searchResults&#39;.&#160; So my question is, how do I reinitiate a new grid with different column model if GridDestroy is going to kill my targeted id (searchResults)???</p>
</p>
<p>Here is what I am working with so far.&#160;</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6838' value='Select Code' data-codeid='sfcode6838' /></p>
<div class='sfcode' id='sfcode6838'>$(&#34;#riot&#34;).click( function() {<br />&#160;&#160; &#160;&#160;&#160; &#160;var munitionType = jQuery(&#39;#searchResults&#39;).jqGrid(&#39;getGridParam&#39;,&#39;xmlReader:row&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;if (jQuery(&#39;#searchResults&#39;).children().length &#62; 0) {&#160;&#160; // grid already built<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if (munitionType == &#39;chem&#39;) {&#160; // checks for correct munitions group xml file loaded<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#searchResults&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#34;weaponLib/chem_riot.xml&#34;}).trigger(&#34;reloadGrid&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;alert(&#39;grid loaded but wrong munitions group xml loaded&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;/*jQuery(&#39;#searchResults&#39;).jqGrid(&#39;GridDestroy&#39;, &#39;#gbox_searchResults&#39;);&#160; // destroys the grid<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#searchResults&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#34;weaponLib/chem_riot.xml&#34;}).trigger(&#34;reloadGrid&#34;);*/<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;alert(&#34;grid not built&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;// build a brand new grid from scratch<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;});</div>
]]></description>
        	        	<pubDate>Thu, 23 Sep 2010 21:59:31 +0300</pubDate>
        </item>
</channel>
</rss>