<?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 Setting root to a child</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child</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-setting-root-to-a-child/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on jsonReader Setting root to a child</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p958</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p958</guid>
        	        	<description><![CDATA[<p>DataTypes-&#62;JSON Data-&#62;JSON - somewhere in the middle of the page</p>
<p>Reagrds</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 01 Jul 2008 01:56:12 +0300</pubDate>
        </item>
        <item>
        	<title>emeade on jsonReader Setting root to a child</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p953</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p953</guid>
        	        	<description><![CDATA[<p>Thanks. I didn&#39;t even see that.</p>
<p>The unfortunate thing is I&#39;m using a built in function of Coldfusion and that is the way it is doing the formatting.</p>
<p>I guess I&#39;ll have to write my own.</p>
]]></description>
        	        	<pubDate>Mon, 30 Jun 2008 13:54:40 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jsonReader Setting root to a child</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p952</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p952</guid>
        	        	<description><![CDATA[<p>I think that your json is not well formated for use of jqGrid</p>
<p>if possible try this</p>
<p>jsonReader: {root:&#8221;DATA&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page:&#8221;CURRENTPAGE&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total:&#8221;TOTALPAGES&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; records:&#8221;TOTALRECORDS&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cell:&#8221;",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id:&#8221;0&#8243;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>and the json sholuld be</p>
<p>{&#8221;CURRENTPAGE&#8221;:1.0,<br />&#8220;QUERY&#8221;:{<br />&#160;&#160;&#160; &#8220;COLUMNS&#8221;:["HOUSEHOLDID","HOUSEHOLDNAME","FULLADDRESS","CREATEDATEFORMATED","LASTUPDATEDFORMATED","HOUSEHOLDTYPE"],<br />&#160;&#160;&#160; &#8220;DATA&#8221;:[<br />&#160;&#160;&#160; &#160;&#160;&#160; {"001","dfdsf","sdfsfsdfsdf","05\\/13\\/0810:05:00","05\\/13\\/0810:05:00","Individual Household"},<br />&#160;&#160;&#160; &#160;&#160;&#160; {"002","sdff","sfddsf","04\\/14\\/0811:07:00","04\\/14\\/0811:07:00","Family Foster Care"},</p>
<p>.....</p>
</p>
<p>Note the replacement of [] with {}</p>
</p>
<p>In the docs there is such example</p>
]]></description>
        	        	<pubDate>Mon, 30 Jun 2008 12:13:41 +0300</pubDate>
        </item>
        <item>
        	<title>emeade on jsonReader Setting root to a child</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p949</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonreader-setting-root-to-a-child#p949</guid>
        	        	<description><![CDATA[<p>The data in my json is actually at a child level: query/data. <br />I have defined a custom jsonReader but I&#39;m not sure <br />how or if it is possible to specifiy the root <br />when it is a child of another node.</p>
<p>The reader seems to be working because the pager is displaying <br />the correct values but the grid is not displaying any data rows. <br />Firebug does not generate any errors. <br />I&#39;ve tried root:&#8221;DATA&#8221;, root:&#8221;QUERY[1]&#8221; and neither works. <br />I&#39;m a bit of a json newbie so they are mainly guesses.</p>
<p>Here is my jsonReader:</p>
<p>jsonReader: {root:"DATA",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page:"CURRENTPAGE",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total:"TOTALPAGES",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; records:"TOTALRECORDS",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cell:"",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id:"0"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>And here is my json (generated via Coldfusion returnformat=&#8221;json&#8221;)</p>
<p>{"CURRENTPAGE":1.0,<br />"QUERY":{<br />&#160;&#160;&#160; "COLUMNS":["HOUSEHOLDID","HOUSEHOLDNAME","FULLADDRESS","CREATEDATEFORMATED","LASTUPDATEDFORMATED","HOUSEHOLDTYPE"],<br />&#160;&#160;&#160; "DATA":[<br />&#160;&#160;&#160; &#160;&#160;&#160; ["001","dfdsf","sdfsfsdfsdf","05\\/13\\/0810:05:00","05\\/13\\/0810:05:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["002","sdff","sfddsf","04\\/14\\/0811:07:00","04\\/14\\/0811:07:00","Family Foster Care"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["003","sdfdsf","sdfsdfsdf","05\\/07\\/0813:02:00","05\\/07\\/0813:02:00","Family Foster Care"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["004","sdffd","sdfsdfsdf","10\\/11\\/0700:33:00","10\\/11\\/0700:33:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["005","ssddfdf","sdfsdffdfsd","10\\/19\\/0700:20:00","10\\/19\\/0700:20:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["006","sdfdsfdf","sdfsdfsdfdfs","10\\/19\\/0701:10:00","10\\/19\\/0701:10:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["007","sdfsdfsdf","1ssdfsdfsdfdsffd","10\\/19\\/0701:40:00","10\\/19\\/0701:40:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["008","sdfsdff","sdfsdsdfdfs","11\\/15\\/0714:54:00","11\\/15\\/0714:54:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["009","sdsdfsf","sdfsdfsdf","01\\/02\\/0800:47:00","01\\/02\\/0800:47:00","Individual Household"],<br />&#160;&#160;&#160; &#160;&#160;&#160; ["010","sfsddf","sdfsdfsdfsdf","01\\/02\\/0801:25:00","01\\/02\\/0801:25:00","Individual Household"]<br />&#160;&#160;&#160; &#160;&#160;&#160; ]<br />&#160;&#160;&#160; },<br />"TOTALRECORDS":41,<br />"TOTALPAGES":10.0}</p>
]]></description>
        	        	<pubDate>Mon, 30 Jun 2008 10:34:06 +0300</pubDate>
        </item>
</channel>
</rss>