<?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: jsonReader for this datasource</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-for-this-datasource</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/jsonreader-for-this-datasource/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>daniel2d2art on jsonReader for this datasource</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-for-this-datasource#p24291</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonreader-for-this-datasource#p24291</guid>
        	        	<description><![CDATA[<p>Hi here!</p>
<p>could you show me which is the "<strong>jsonReader</strong>" for this datasource:</p>
</p>
<p>{<br />&#160; "total":"30",<br />&#160; "page":"1",<br />&#160; "records":"300",<br />&#160; "result": [ <br />&#160;&#160; &#160;&#160;&#160; &#160;{ "car": { "id":495,&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "title":"Wireless Communications-4",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; "power":8,&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; &#160;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; "color":"Turquoise",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; "manufacturer":"Leexo",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; "production_starts_at":"2000-10-06",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; "production_ends_at":"2027-04-04" }<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;{"car": { "id":463, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "title":"Wholesale, Other-8",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "power":8,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "color":"Red",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "manufacturer":"Youfeed",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "production_starts_at":"2003-01-07",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "production_ends_at":"2029-03-28"}<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;{"car": { "id":355,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "title":"Wholesale Other-1",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "power":2,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "color":"Blue",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "manufacturer":"Realbuzz",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "production_starts_at":"2004-06-07",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; "production_ends_at":"2027-10-12"}<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;]<br />}</p>
</p>
<p>I can read it <strong>OK</strong>, using <strong>dot</strong> accesing in <strong>colModel</strong> "<em>name</em>" property</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel :[&#160; {<strong>name:&#39;car.title&#39;</strong>, index:&#39;title&#39;, width:55} .... .... ... ]</p>
<p>And this jsonReader</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader : {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; root:"result",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page: "page",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total: "total",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; records: "records",<br />&#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; id: "car.id"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</p>
<p>But I want to use it directly using "<strong>cell</strong>" definition and avoid the dot accesing in <em>name</em> property or <em>jsonmap</em> property.</p>
<p>jsonReader : {</p>
<p>...</p>
<p>&#160; cell: "car"</p>
<p>...</p>
<p>}</p>
</p>
<p>But cell property don&#39;t runs properly with this estructure... I can&#39;t get the correct jsonReader set.</p>
<p>I think tried all&#160;the&#160;possible combinations, but not results.&#160;Perhaps this&#160;data structure&#160;can&#39;t be&#160;mapped&#160;directly to the jsonReader and needs using&#160;dot accessing or jsonmap in colModel</p>
<p>Any suggestions?</p>
</p>
<p>Thanks guys!!</p></p>
]]></description>
        	        	<pubDate>Tue, 16 Aug 2011 03:49:11 +0300</pubDate>
        </item>
</channel>
</rss>