<?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: JSON Data problem</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-problem</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/json-data-problem/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mbanaouas on JSON Data problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-problem#p7563</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-problem#p7563</guid>
        	        	<description><![CDATA[<p>the problem is caused by bad data format.</p>
<p>for jqGrid, json data must to be in a special format :</p>
<p>{<br />&#160; "page":"1",<br />&#160; "total":1,<br />&#160; "records":"3",<br />&#160; "rows":[<br />&#160;&#160;&#160; {"id":"1","cell":["1","2009-06-15","CLI-1","75000","5000","80000","cli-1"]},<br />&#160;&#160;&#160; {"id":"2","cell":["2","2009-06-08","CLI-2","45000","5000","50000","cli-2"]},<br />&#160;&#160;&#160; {"id":"3","cell":["3","2009-06-01","CLI-3","25000","5000","30000","cli-3"]}<br />&#160; ]<br />}</p>
<p>Now it works fine !</p>
]]></description>
        	        	<pubDate>Tue, 30 Jun 2009 19:03:53 +0300</pubDate>
        </item>
        <item>
        	<title>mbanaouas on JSON Data problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-problem#p7551</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-problem#p7551</guid>
        	        	<description><![CDATA[<p>I&#39;m facing a problem with JSON Data.</p>
<p>I started with jqGrid "Demos Array" (local data) and it works fine.</p>
<p>Now, I would like to move to json callback but the grid shows &#39;Loading ...&#39; and firebug show this error:<span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch"> </span></p>
<p><span class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch">n is undefined</span></p>
<p>grid.base-min.js :... b.fn.setSelection=function(w,z,q){return this.each(function(){var g=this,m,l,n;z=z===false?false:true;if(w===false){l= ...</p>
<p>I provide "grid_data.txt" file in apache server root folder containing the json data:</p>
<p>{"total": "1","page": "1", "records": "1", "rows" :&#160; [ {"id":"1","invdate":"2007-10-01","name":"test","note":"note","amount":"200.00","tax":"10.00","total":"210.00"}<br />&#160; ]}</p>
<p>and this is script part of grid_url.html:</p>
<p>&#60;script type="text/javascript"&#62;<br />// We use a document ready jquery function.<br />jQuery.noConflict();<br />jQuery(document).ready(function(){<br />&#160; gridimgpath = "themes/green/images";<br />&#160; jQuery("#list4").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;grid_data.txt&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160; &#160;&#160;&#160; height: 250,<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; colNames:[&#39;Inv No&#39;,&#39;Date&#39;, &#39;Client&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;],<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;name&#39;,index:&#39;name&#39;, width:100},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"},<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false}<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; pager: jQuery(&#39;#pager2&#39;),<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; imgpath: gridimgpath,<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; multiselect: true,<br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; caption: "Manipulating Array Data",<br />&#160;&#160;&#160;&#160;&#160; jsonReader : { root: "rows", page: "page", total: "total" , records: "records" }<br />&#160; });<br />});<br />&#60;/script&#62;</p>
<p>Any thoughts are appeciated. Regards.</p>
]]></description>
        	        	<pubDate>Tue, 30 Jun 2009 07:40:45 +0300</pubDate>
        </item>
</channel>
</rss>