<?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: Problem using repeatItems: false with jsonReader</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader</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/problem-using-repeatitems-false-with-jsonreader/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Problem using repeatItems: false with jsonReader</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5892</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5892</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I think that in this case you should outut the data this way:</p>
<p>{&#8221;page&#8221;:1,&#8221;total&#8221;:1,&#8221;records&#8221;:7,&#8221;rows&#8221;:[ {"id":"1","firstname":"1joe","lastname":"c6lark"<br />,"tel":"12390 293 12 30 12"},...</p>
</p>
<p>If this is not possible use jsonmap property like this</p>
<p>jsonmap : &#39;cell.firstname&#39;</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 07 Apr 2009 08:06:58 +0300</pubDate>
        </item>
        <item>
        	<title>jukea on Problem using repeatItems: false with jsonReader</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5862</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5862</guid>
        	        	<description><![CDATA[<p>Just to clarify, I still have the problem even with the fix I did. The formatting of the last post might be confusing..</p>
]]></description>
        	        	<pubDate>Mon, 06 Apr 2009 09:55:53 +0300</pubDate>
        </item>
        <item>
        	<title>jukea on Problem using repeatItems: false with jsonReader</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5843</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5843</guid>
        	        	<description><![CDATA[<p>oops, i discovered a bug, I changed</p>
<pre id="line138">jsonReader:["repeatItems",false],<br /></pre>
<pre id="line138"><br />to<br /><br />jsonReader:{"repeatItems":false},<br /><br />but it still doesn&#39;t work...<br /><br />by the way, the reason you see all those escaped slashes ( \\/ ),<br />is that I&#39;m making a php wrapper to generate the javascript, and I json_encode the values.<br />It works well (ie: the paths are parsed correctly).<br /></pre>
]]></description>
        	        	<pubDate>Fri, 03 Apr 2009 15:31:45 +0300</pubDate>
        </item>
        <item>
        	<title>jukea on Problem using repeatItems: false with jsonReader</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5842</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-using-repeatitems-false-with-jsonreader#p5842</guid>
        	        	<description><![CDATA[<p>Hi, </p>
<p>I&#39;m trying to pass from a working grid configuration using jsonReader -&#62; repeatItems:true (the value by default), to a version with repeatItems: false , that is having the cells described as key:value pairs instead of simply values in the json data.</p>
<p>Example ..: This works : </p>
<p>json data :</p>
<p>{"page":1,"total":1,"records":7,"rows":[{"id":"1","cell":["1","1joe","c6lark","12390 293 12 30 12"]}<br />,{"id":"2","cell":["2","2joe","5clark","12390 293 12 30 12"]},{"id":"3","cell":["3","3joe","5clark","12390<br />&#160;2545493 12 30 12"]},{"id":"4","cell":["4","5joe","4clark","12390 293 12 30 12"]},{"id":"5","cell":["5"<br />,"6joe","3clark","12390 293 12 30 12"]},{"id":"6","cell":["6","7joe","12clark","12390 293 12 30 12"]<br />},{"id":"7","cell":["7","8joe","1clark","12390 293 12 30 12"]}]}</p>
<p>client code : </p>
<p>&#160;&#160;&#160;&#160; $("#grid_349367564").jqGrid(<br />&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Id&#39;,&#39;Firstname&#39;,&#39;Lastname&#39;,&#39;Tel&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:40, resizable:false, name:"id", index:"id"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:"100", resizable:false, name:"firstname", index:"firstname"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:"100", resizable:false, name:"lastname", index:"lastname"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:140, resizable:false, name:"tel", index:"tel"}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype:"json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath:"\\/espLibGridPlugin\\/themes\\/steel\\/images",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; height:"auto",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadError:"function(xhr,st,err) {alert(\\"Type: \\"+st+\\"; Response: \\"+ xhr.status + \\" \\"+xhr.statusText);}",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:"\\/gridData?md=dummy&#38;nd=1238788660",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; id:"grid_349367564",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager:"grid_pager_1138251041"&#160;&#160;&#160; });</p>
<p>However, after using the fieldname as row data keys</p>
<p>json data :</p>
<p>{"page":1,"total":1,"records":7,"rows":[{"id":"1","cell":{"id":"1","firstname":"1joe","lastname":"c6lark"<br />,"tel":"12390 293 12 30 12"}},{"id":"2","cell":{"id":"2","firstname":"2joe","lastname":"5clark","tel"<br />:"12390 293 12 30 12"}},{"id":"3","cell":{"id":"3","firstname":"3joe","lastname":"5clark","tel":"12390<br />&#160;2545493 12 30 12"}},{"id":"4","cell":{"id":"4","firstname":"5joe","lastname":"4clark","tel":"12390 293<br />&#160;12 30 12"}},{"id":"5","cell":{"id":"5","firstname":"6joe","lastname":"3clark","tel":"12390 293 12 30<br />&#160;12"}},{"id":"6","cell":{"id":"6","firstname":"7joe","lastname":"12clark","tel":"12390 293 12 30 12"<br />}},{"id":"7","cell":{"id":"7","firstname":"8joe","lastname":"1clark","tel":"12390 293 12 30 12"}}]}</p>
<p>client code : (only the jsonReader directive is added)</p>
<p>&#160;&#160;&#160;&#160;&#160; $("#grid_2020711008").jqGrid(<br />&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Id&#39;,&#39;Firstname&#39;,&#39;Lastname&#39;,&#39;Tel&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:40, resizable:false, name:"id", index:"id"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:100, resizable:false, name:"firstname", index:"firstname"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:100, resizable:false, name:"lastname", index:"lastname"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {width:140, resizable:false, name:"tel", index:"tel"}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160; datatype:"json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath:"\\/espLibGridPlugin\\/themes\\/steel\\/images",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; height:"auto",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadError:"function(xhr,st,err) {alert(\\"Type: \\"+st+\\"; Response: \\"+ xhr.status + \\" \\"+xhr.statusText);}",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:"\\/gridData?md=dummy&#38;nd=1238788604",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader:["repeatItems",false],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; id:"grid_2020711008",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager:"grid_pager_43731544"&#160;&#160;&#160; });</p>
<p>I correctly get the number of rows in the pager, but no row is shown. Ca you see what I&#39;m doing wrong ?</p>
<p>On a side note, is it possible to get an error from this ? even using loadError as above, I never get an alert box. I suppose that is because the server answers with a 200 response, even if the json data is not correct. But is it possible to detect json data malformation with an event / error ?<br />&#160;<br />Thanks for your great work!</p>
]]></description>
        	        	<pubDate>Fri, 03 Apr 2009 15:14:56 +0300</pubDate>
        </item>
</channel>
</rss>