<?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: Having trouble binding json data to the grid.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/having-trouble-binding-json-data-to-the-grid</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/having-trouble-binding-json-data-to-the-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mattdlong on Having trouble binding json data to the grid.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/having-trouble-binding-json-data-to-the-grid#p19215</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/having-trouble-binding-json-data-to-the-grid#p19215</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I&#39;m hoping someone can help me out, I&#39;m having some trouble binding my json data to the grid, it looks as if the correct number of rows I am expecting are being displayed in my grid, but nothing seems to be bound inside my columns.</p>
</p>
<p>My json data looks like this,</p>
<p>{"page":1,"total":1,"records":2,"rows":[{"Id":1,"Start":"7/19/2010 12:00:00 AM","End":"8/18/2010 12:00:00 AM","MediaId":"E0001"},{"Id":1,"Start":"7/19/2010 12:00:00 AM","End":"8/18/2010 12:00:00 AM","MediaId":"E0002"}]}</p>
</p>
<p>Which I&#39;m trying to bind to my grid using this code,</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#job-list").jqGrid(<br />&#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; url: "Report/RetrieveJobs/" + startDate + "/" + endDate + "/" + clientId + "/" + projectId + "/" + mediaId,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: 200,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader : {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; root: "rows",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total: "total",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cell: "",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Id&#39;, &#39;Media Id&#39;, &#39;Start Date&#39;, &#39;End Date&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Id&#39;, index: &#39;Id&#39;, width: 55 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;MediaId&#39;, index: &#39;MediaId&#39;, width: 90 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Start&#39;, index: &#39;Start&#39;, width: 100 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;End&#39;, index: &#39;End&#39;, width: 100 }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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; sortname: &#39;Id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "asc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; multiselect: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadComplete: showJobList<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
</p>
<p>When the data is bound, the loadComplete callback is successfully being called, and like I said the correct number of rows are being displayed on the column, my only problem is that there is no data being displayed in the column cells.</p>
<p>If someone could give me some guidance I would really apprecaite it.</p>
</p>
<p>Thanks in advance,</p>
</p>
<p>Matt.</p>
]]></description>
        	        	<pubDate>Thu, 19 Aug 2010 21:19:29 +0300</pubDate>
        </item>
</channel>
</rss>