<?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: Issue in getting the grid to work...</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work</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/issue-in-getting-the-grid-to-work/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13238</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13238</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I think you make the same error.</p>
<p>In you case with this configuration you should set in jsonReader - repeatitems:false.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 22 Dec 2009 09:18:29 +0200</pubDate>
        </item>
        <item>
        	<title>David on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13188</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13188</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>I tried it, but it doesn&#39;t seem to be working either.</p>
<p>I do in fact repeat the item names in my data returned from PHP, but I think I&#39;m positioning something in the wrong location of the array...</p>
<p>This is the latest version of the javascript code I tried:</p>
</p>
<blockquote>
<p><span class="sourceRowText ">jQuery("#grdListAllLedgerAccount0_jqdg").jqGrid( </span></p>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">{ </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">url:&#39;jsonserver.php?JQDG=1&#38;_rw=3&#38;_l=en&#38;_c=LedgerAccount&#38;_a=adminManage&#38;_s=0&#38;&#38;AJAXGRID=grdListAllLedgerAccount0&#39;, </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">datatype: "json", </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">autowidth: true, </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">height: "auto", </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160; </span><span class="sourceRowText ">colNames:[ </span></div>
<div class="sourceRow "><span class="sourceLine ">&#160;&#39; </span><span class="sourceRowText ">Inv No&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Date&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Client&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Amount&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Tax&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Total&#39;, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;&#39;Notes&#39;], </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;colModel:[ </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;name&#39;,index:&#39;name&#39;, width:100}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"}, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;{name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false} ], </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;multiselect: true, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;caption: "&#60;img src=&#39;/images/icons/16x16/plain-v/folder2_blue.png&#39;&#62; Ledger Accounts", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;rowNum:10, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;jsonReader : { </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;root: "data", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;page: "page", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;total: "total", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;records: "records", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;repeatitems: true, </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;cell: "rec", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;id: "id", </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;userdata: "userdata" </span></div>
<div class="sourceRow "><span class="sourceRowText ">&#160;} </span></div>
<div class="sourceRow "><span class="sourceRowText ">} </span></div>
<div class="sourceRow "><span class="sourceRowText "> ); </span></div>
<div class="sourceRow "></div>
</blockquote>
<div class="sourceRow ">The data is sent back from PHP as follows:</div>
<div class="sourceRow "></div>
<div class="sourceRow ">
<div class="netInfoResponseText netInfoText ">
<blockquote>
<pre><code>{"page":1,"total":1,"records":10,"data":[{"id":1,"rec":{"id":1,"invdate":"2007-10-1","name":"Test name</code><code> 1","note":"Test note 1","amount":1,"tax":0,"total":0}},{"id":2,"rec":{"id":2,"invdate":"2007-10-2","name"</code><code>:"Test name 2","note":"Test note 2","amount":4,"tax":0,"total":0}},{"id":3,"rec":{"id":3,"invdate":"2007-10-3"</code><code>,"name":"Test name 3","note":"Test note 3","amount":9,"tax":0,"total":0}},{"id":4,"rec":{"id":4,"invdate"</code><code>:"2007-10-4","name":"Test name 4","note":"Test note 4","amount":16,"tax":0,"total":0}},{"id":5,"rec"</code><code>:{"id":5,"invdate":"2007-10-5","name":"Test name 5","note":"Test note 5","amount":25,"tax":0,"total"</code><code>:0}},{"id":6,"rec":{"id":6,"invdate":"2007-10-6","name":"Test name 6","note":"Test note 6","amount":36</code><code>,"tax":0,"total":0}},{"id":7,"rec":{"id":7,"invdate":"2007-10-7","name":"Test name 7","note":"Test note</code><code> 7","amount":49,"tax":0,"total":0}},{"id":8,"rec":{"id":8,"invdate":"2007-10-8","name":"Test name 8"</code><code>,"note":"Test note 8","amount":64,"tax":0,"total":0}},{"id":9,"rec":{"id":9,"invdate":"2007-10-9","name"</code><code>:"Test name 9","note":"Test note 9","amount":81,"tax":0,"total":0}},{"id":10,"rec":{"id":10,"invdate"</code><code>:"2007-10-10","name":"Test name 10","note":"Test note 10","amount":100,"tax":0,"total":0}}]}</code></pre>
<div class="sourceRow "></div>
</blockquote>
</div>
</div>
<div class="sourceRow ">If I&#39;m reading docs okay, I told the grid to get data from "data" branch in the array by setting "root" to "data.</div>
<div class="sourceRow ">Then within data, I have the data records structured as follows:</div>
<div class="sourceRow "></div>
<div class="sourceRow ">id: XXX</div>
<div class="sourceRow ">rec:</div>
<div class="sourceRow ">&#160;&#160;&#160; &#124;--&#62; id: XXX</div>
<div class="sourceRow ">&#160;&#160;&#160; &#124;--&#62; invdate: XXX</div>
<div class="sourceRow ">&#160;&#160;&#160; &#124;--&#62; ... all other data fields</div>
<div class="sourceRow "></div>
<div class="sourceRow ">Is that correct?&#160; I set cell to "rec" and id to "id" in javascript&#160; and made sure each rec has the same column ids as initially initialised by javascript...</div>
<div class="sourceRow "></div>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 22:45:58 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13187</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13187</guid>
        	        	<description><![CDATA[<p>And again me,</p>
<p>or set in colModel key:true property</p>
<p>i.e</p>
<p><input type='button' class='sfcodeselect' name='sfselectit298' value='Select Code' data-codeid='sfcode298' /></p>
<div class='sfcode' id='sfcode298'>
<p>$("#mygrid").jqGrid({</p>
<p>..</p>
<p>colModel:[</p>
<p>{name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int", key:true}</p>
<p>..</p>
<p>],</p>
<p>jsonReader: {repeatitems:false},</p>
<p>...</p>
<p>});</p>
</div>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 22:35:48 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13186</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13186</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Try</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1898' value='Select Code' data-codeid='sfcode1898' /></p>
<div class='sfcode' id='sfcode1898'>
<p>jsonReader:{repeatitems:false, id:"0"}</p>
</div>
<p>regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 22:30:12 +0200</pubDate>
        </item>
        <item>
        	<title>David on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13184</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13184</guid>
        	        	<description><![CDATA[<p>Thanks for the fantastically fast response!!!&#160; This is MUCH appreciated.</p>
<p>For some reason I did not find that info before.</p>
</p>
<p>I fixed it, but I don&#39;t see what is wrong now...</p>
<p>The page is now loading its 10 records, but unfortunately I&#39;m still not seeing data IN the grid...</p>
</p>
<p>Any idea what might be causing this?</p>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 21:58:07 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13180</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13180</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. everthing will work also if you configure the jsonReader.</p>
<p>More you can find here.</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....#json_data</a></p>
<p>Maybe you will need only to set in the reader - repeatitems:false and your grid will work.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 21:34:45 +0200</pubDate>
        </item>
        <item>
        	<title>David on Issue in getting the grid to work...</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13175</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-in-getting-the-grid-to-work#p13175</guid>
        	        	<description><![CDATA[<p>I posted this on the blog before I noticed you had a forum as well, so I do apologise for crossposting on two locations!!!&#160; You can remove the blog comment if you wish, and I have bookmarked this forum now...</p>
<p>That being said, here is a copy of my post...</p>
</p>
<p>---</p>
</p>
<div id="commentbody-7428">
<p>Hi,</p>
<p>First of all &#8211; wow and thank you for a great library! It&#8217;s looking fantastic, and I am currently migrating an old grid we used to use your library.</p>
<p>For some reason though, I&#8217;m not getting it to work, and I hope you might take a look at the following.</p>
</p>
<p>My JS is as follows:</p>
</p>
<blockquote>
<p>jQuery(&#8221;#grdListAllLedgerAccount0_jqdg&#8221;).jqGrid(<br /> {<br /> url:&#8217;jsonserver.php?JQDG=1&#38;_rw=3&#38;_l=en&#38;_c=LedgerAccount&#38;_a=adminManage&#38;_s=0&#38;&#38;AJAXGRID=grdListAllLedgerAccount0&#8242;,<br /> datatype: &#8220;json&#8221;,<br /> autowidth: true,<br /> height: &#8220;auto&#8221;,<br /> colNames:[<br /> &#39;Inv No&#39;,<br /> &#39;Date&#39;,<br /> &#39;Client&#39;,<br /> &#39;Amount&#39;,<br /> &#39;Tax&#39;,<br /> &#39;Total&#39;,<br /> &#39;Notes&#39;],<br /> colModel:[<br /> {name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"},<br /> {name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"},<br /> {name:&#39;name&#39;,index:&#39;name&#39;, width:100},<br /> {name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"},<br /> {name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"},<br /> {name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"},<br /> {name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false} ],<br /> multiselect: true,<br /> caption: &#8221; Ledger Accounts&#8221;,<br /> rowNum:10<br /> }<br /> );</p>
</blockquote>
<p>The PHP script &#8211; I believe correctly &#8211; returns the following JSON:</p>
</p>
<blockquote>
<p> {&#8221;page&#8221;:1,&#8221;total&#8221;:2,&#8221;records&#8221;:13,&#8221;rows&#8221;:[{"id":1,"invdate":"2007-10-1","name":"Test name 1","note":"Test note 1","amount":1,"tax":0.21,"total":1.21},{"id":2,"invdate":"2007-10-2","name":"Test name 2","note":"Test note 2","amount":4,"tax":0.84,"total":4.84},{"id":3,"invdate":"2007-10-3","name":"Test name 3","note":"Test note 3","amount":9,"tax":1.89,"total":10.89},{"id":4,"invdate":"2007-10-4","name":"Test name 4","note":"Test note 4","amount":16,"tax":3.36,"total":19.36},{"id":5,"invdate":"2007-10-5","name":"Test name 5","note":"Test note 5","amount":25,"tax":5.25,"total":30.25},{"id":6,"invdate":"2007-10-6","name":"Test name 6","note":"Test note 6","amount":36,"tax":7.56,"total":43.56},{"id":7,"invdate":"2007-10-7","name":"Test name 7","note":"Test note 7","amount":49,"tax":10.29,"total":59.29},{"id":8,"invdate":"2007-10-8","name":"Test name 8","note":"Test note 8","amount":64,"tax":13.44,"total":77.44},{"id":9,"invdate":"2007-10-9","name":"Test name 9","note":"Test note 9","amount":81,"tax":17.01,"total":98.01},{"id":10,"invdate":"2007-10-10","name":"Test name 10","note":"Test note 10","amount":100,"tax":21,"total":121},{"id":11,"invdate":"2007-10-11","name":"Test name 11","note":"Test note 11","amount":121,"tax":25.41,"total":146.41},{"id":12,"invdate":"2007-10-12","name":"Test name 12","note":"Test note 12","amount":144,"tax":30.24,"total":174.24},{"id":13,"invdate":"2007-10-13","name":"Test name 13","note":"Test note 13","amount":169,"tax":35.49,"total":204.49}]}</p>
</blockquote>
<p>When the above code is ran, however, javascript is returning the following error in my firebug:</p>
</p>
<blockquote>
<p>cur is undefined</p>
<p>anonymous(Object page=1 total=2 records=13 rows=[13], div.ui-jqgrid-bdiv, Object name=rcnt value=0, Object name=more value=false, Object name=adjust value=0)jquery.j&#8230;id.min.js (regel 10)<br /> anonymous(XMLHttpRequest readyState=4 status=200 statusText=OK, &#8220;success&#8221;)jquery.j&#8230;id.min.js (regel 10)<br /> L()jquery.min.js (regel 19)<br /> anonymous(8)jquery.min.js (regel 19)<br /> [Break on this error] (function($){$.jgrid=$.jgrid&#124;&#124;{};$.exten&#8230;$t.p.id).resizable(opts)})}})})(jQuery);</p>
<p>Am I overlooking something here?</p>
</blockquote>
<p>Thanks for a quick look at this!!!  And once again &#8211; WOW and THANKS!&#160;</p>
</div>
]]></description>
        	        	<pubDate>Fri, 18 Dec 2009 21:07:58 +0200</pubDate>
        </item>
</channel>
</rss>