<?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: loading local data from static xml file (client side only)</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/loading-local-data-from-static-xml-file-client-side-only</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/loading-local-data-from-static-xml-file-client-side-only/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Energetic Pixels on loading local data from static xml file (client side only)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/loading-local-data-from-static-xml-file-client-side-only#p20981</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/loading-local-data-from-static-xml-file-client-side-only#p20981</guid>
        	        	<description><![CDATA[<p>Never mind.&#160; I figured it out.&#160; Had a comma where it was not supposed to be.&#160; Now I feel like a real doofus.</p>
<p>Tony<img class="spSmiley" style="margin:0" title="Laugh" src="/blog/wp-content/forum-smileys/sf-laugh.gif" alt="Laugh" /><img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /><img class="spSmiley" style="margin:0" title="Embarassed" src="/blog/wp-content/forum-smileys/sf-embarassed.gif" alt="Embarassed" /></p>
]]></description>
        	        	<pubDate>Wed, 24 Nov 2010 19:46:12 +0200</pubDate>
        </item>
        <item>
        	<title>Energetic Pixels on loading local data from static xml file (client side only)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/loading-local-data-from-static-xml-file-client-side-only#p20979</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/loading-local-data-from-static-xml-file-client-side-only#p20979</guid>
        	        	<description><![CDATA[</p>
<p>I see in documentation where I can load local data as a variable (local data expressed in JSON format).&#160; But I need to load a xml file that will be stored on the client&#39;s computer.&#160; If I put datatype as xml, jqGrid tries to use the internet to get the data resource.&#160; How do I redirect this action so that it grabs the xml data from a already stored file on client&#39;s (local) computer.</p>
</p>
<p>I tried using datatype: local, but all I get is the grid built and no data coming in.</p>
<p>My xml reader setting within my function says:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2672' value='Select Code' data-codeid='sfcode2672' /></p>
<div class='sfcode' id='sfcode2672'>xmlReader: {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;root : &#34;smallArms&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;row: &#34;bullet&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;repeatitems: false,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;id: &#34;[ID]&#34;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},</div>
<p>Then when I call the jqGrid function as a result of a site button click, I am dynamically changing the settings to:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7525' value='Select Code' data-codeid='sfcode7525' /></p>
<div class='sfcode' id='sfcode7525'>$(&#34;#twotwocal&#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;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if (munitionType == &#39;bullet&#39;) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#39;#searchResults&#39;).jGrid(&#39;GridUnload&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#searchResults&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#34;/weaponLib/sa-22cal.xml&#34;,datatype: &#39;local&#39;}).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;jQuery(&#39;#searchResults&#39;).jqGrid(&#39;GridUnload&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;saModel();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#searchResults&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#39;/weaponLib/sa-22cal.xml&#39;,datatype: &#39;local&#39;}).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;saModel();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#searchResults&#34;).jqGrid(&#39;setGridParam&#39;,{url:&#39;/weaponLib/sa-22cal.xml&#39;,datatype: &#39;local&#39;}).trigger(&#34;reloadGrid&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#welcome&#39;).hide(&#39;slow&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#theGrid&#39;).show(&#39;fast&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;});</div>
<p>The whole set up works great when on the web server and my datatype is set to &#39;xml&#39;.</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 24 Nov 2010 17:14:47 +0200</pubDate>
        </item>
</channel>
</rss>