<?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: Local Json Data</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/local-json-data</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/bugs/local-json-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>m4strmind on Local Json Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/local-json-data#p22496</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/local-json-data#p22496</guid>
        	        	<description><![CDATA[<p>I was able to solve the issue by using local data but adding a column of name "id" to each row which gets used for the data.</p>
</p>
<p>this wasnt obvious from the documentation, but it seems to work!</p>
</p>
<p>Thanks anyway</p>
]]></description>
        	        	<pubDate>Mon, 21 Mar 2011 15:33:19 +0200</pubDate>
        </item>
        <item>
        	<title>m4strmind on Local Json Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/local-json-data#p22468</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/local-json-data#p22468</guid>
        	        	<description><![CDATA[<p>I have defined a datagrid in the following way:</p>
</p>
<p>$("#grid").jqGrid(<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: 400,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; autowidth: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;local&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; altRows: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:<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; &#39;col 1&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;col 2&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;col 3&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;col 4&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;col 5&#39;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:<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; { name: &#39;col1&#39;, index: &#39;col1&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;col2&#39;, index: &#39;col2&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;col3&#39;, index: &#39;col3&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;col4&#39;, index: &#39;col4&#39;, formatter: cellFormatter},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;col5&#39;, index: &#39;col5&#39;, formatter: cellFormatter }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowNum: gridData.rows.length,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; recordtext: "{2} Results",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;col1&#39;,<br />&#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; caption: "caption",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pgbuttons: false,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pginput: false<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160; &#160;&#160;&#160; &#160;$("#grid")[0].addJSONData(gridData);</p>
</p>
<p>the idea is that i want to send the data down from the server as gridData with the original request.</p>
<p>when the above code runs, it generates blank rows for each record, the ones with cell formatters will input undefined.</p>
<p>I do not want to use array data because i do not want generically assigned id&#39;.&#160; I need to minipulate the data base on outside criteria so i need non generic id&#39;s.</p>
</p>
<p>if i change the datatype to json, it does an ajax request for the data after the page loads which is unnecessary for this particular grid.</p>
</p>
<p>if i change the datatype to function(postData){}, it works and makes no request, however the sorting then no longer works.</p>
]]></description>
        	        	<pubDate>Fri, 18 Mar 2011 19:42:42 +0200</pubDate>
        </item>
</channel>
</rss>