<?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: Unable to Map few attribute of JSON in jqgrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/unable-to-map-few-attribute-of-json-in-jqgrid</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/unable-to-map-few-attribute-of-json-in-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ddotsenko on Unable to Map few attribute of JSON in jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/unable-to-map-few-attribute-of-json-in-jqgrid#p16608</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/unable-to-map-few-attribute-of-json-in-jqgrid#p16608</guid>
        	        	<description><![CDATA[<p>The starting point is that you need to give "deep" links to your data in &#39;name&#39; properties on colModel. There are other issues (misspellings) but they are tertiary.</p>
</p>
<p>In your case colModel&#39;s names (in order they are in you example) should be:</p>
</p>
<pre>colModel: [ 
 {name:&#39;head.student_name&#39;, width:100},
 {name:&#39;head.year&#39;, width:100},
 {name:&#39;sub.date&#39;, width:100},
 {name:&#39;sub.number&#39;, width:100}
]</pre>
]]></description>
        	        	<pubDate>Thu, 22 Apr 2010 21:29:55 +0300</pubDate>
        </item>
        <item>
        	<title>ntimesc on Unable to Map few attribute of JSON in jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/unable-to-map-few-attribute-of-json-in-jqgrid#p16602</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/unable-to-map-few-attribute-of-json-in-jqgrid#p16602</guid>
        	        	<description><![CDATA[<pre class="prettyprint"><p><input type='button' class='sfcodeselect' name='sfselectit8648' value='Select Code' data-codeid='sfcode8648' /></p><div class='sfcode' id='sfcode8648'>": "1",<br />"total": 1,<br />"records": "6",<br />"rows": [<br />&#160; &#160; {<br />&#160; &#160; &#160; &#160; "head": {<br />&#160; &#160; &#160; &#160; &#160; &#160; "student_name": "Mr S. Jack ",<br />&#160; &#160; &#160; &#160; &#160; &#160; "year": 2007<br /><br />&#160; &#160; &#160; &#160; },<br />&#160; &#160; &#160; &#160; "sub": [<br />&#160; &#160; &#160; &#160; &#160; &#160; {<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; "course_description": "Math ",<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; "date": "22-04-2010",<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; "number": 1,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; "time_of_add": "2:00",<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; "day": "today"<br />&#160; &#160; &#160; &#160; &#160; &#160; }<br />&#160; &#160; &#160; &#160; ]<br /><br />&#160; &#160; &#160; }<br />]<br />}<br /><br /></div><p>my jqgrid code is as follows</p>
</pre>
<pre class="prettyprint"><p><input type='button' class='sfcodeselect' name='sfselectit8335' value='Select Code' data-codeid='sfcode8335' /></p><div class='sfcode' id='sfcode8335'>jQuery("#"+subgrid_table_id).jqGrid({<br />url:"http://localhost/stud/beta/web/GetStud.php?sid="+sid,<br />dtatype: "json",<br />colNames: [&#39;Stud Name&#39;,&#39;Year&#39;,&#39;Date&#39;.&#39;Number&#39;],<br />colModel: [ {name:&#39;Stud Name&#39;,index:&#39;student_name&#39;, width:100, jsonmap:"student_name"},<br />{name:&#39;Year&#39;,index:&#39;year&#39;, width:100, jsonmap:"year"},<br />{name:&#39;Date&#39;,index:&#39;date&#39;, width:100, jsonmap:"date"},<br />{name:&#39;Number&#39;,index:&#39;number&#39;, width:100, jsonmap:"number"}<br />],<br />height:&#39;100%&#39;,<br />jsonReader: { repeatitems : false, root:"head" },<br />});<br /></div></pre>
<p>So now the problem is as my data i.e. student_name and year is under  "head" , the jqgrid is enable to locate these two fields. at the same  time other two column values i.e. Date and Number lies under "sub" and  even those columns i am not be able to map it with jqgrid</p>
<p>so kindly help me how to located these attributes in JQGrid.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Thu, 22 Apr 2010 16:17:56 +0300</pubDate>
        </item>
</channel>
</rss>