<?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: Help needed with addJSONData method</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-needed-with-addjsondata-method</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/help-needed-with-addjsondata-method/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Help needed with addJSONData method</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-needed-with-addjsondata-method#p19770</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-needed-with-addjsondata-method#p19770</guid>
        	        	<description><![CDATA[<p>If you have <a href="/jqgridwiki/doku.php?id=wiki:retrieving_data#json_string" target="_blank">JSON data as string</a> you can use datatype: &#39;jsonstring&#39; option and add the json data as <a href="/jqgridwiki/doku.php?id=wiki:options" target="_blank">datastr</a>.</p>
<p>Regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Tue, 14 Sep 2010 00:02:55 +0300</pubDate>
        </item>
        <item>
        	<title>simspace on Help needed with addJSONData method</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-needed-with-addjsondata-method#p19764</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-needed-with-addjsondata-method#p19764</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>Due to design reasons I must use the addJSONData method to load my grid.</p>
<p>Can anyone please tell me why my call the addJSONData method does not work?</p>
<p>Below the code is an image of my results.</p>
<p>Thanks!</p>
<p>Chris</p>
</p>
<p>$j(document).ready(function() {<br />&#160;&#160; &#160;/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*/<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;$j("#leadlist").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#39;json&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;altRows:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;loadonce: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;counselor_id&#39;,&#39;first_name&#39;,&#39;last_name&#39;,&#39;email_address&#39;,&#39;phone&#39;,&#39;comment&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;colModel :[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;counselor_id&#39;, index:&#39;counselor_id&#39;, key:true, formatter:&#39;integer&#39;, sorttype:&#39;int&#39;, width:55},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;first_name&#39;, index:&#39;first_name&#39;, width:150}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;last_name&#39;, index:&#39;last_name&#39;, width:150, sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;email_address&#39;, index:&#39;email_address&#39;, width:150, sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;phone&#39;, index:&#39;phone&#39;, width:150, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;comment&#39;, index:&#39;comment&#39;, width:150, sortable:false} <br />&#160;&#160; &#160;&#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160;&#160; jsonReader : {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;root: function (obj) { debugger; return obj; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;cell: function (obj) { return obj; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;page: function (obj) { return 1; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;total: function (obj) { return 1; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;records: function (obj) { return obj.length; }<br />&#160;&#160; &#160;&#160;&#160;&#160; },<br />&#160;&#160; &#160;&#160;&#160; &#160;ondblClickRow: function(rowid, rowndx, colndx, objEvent)<br />&#160;&#160; &#160;&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;top.location.href = &#39;/counselor-hub/lead-profile/id/&#39;+rowid;<br />&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;width:750,<br />&#160;&#160; &#160;&#160;&#160; &#160;height:400,<br />&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#leadpager&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum:30,<br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[15,30,60,100],<br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;name&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: &#39;desc&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;caption: &#39;Counselor Leads&#39;<br />&#160;&#160; &#160;}); </p>
<p>$j(&#39;#leadlist&#39;)[0].addJSONData(&#39;[{"counselor_id":40,"first_name":"Rick","last_name":"tester","email_address":"rick@tester.org","phone":"555-666-7777","comment":"My test comments"}]&#39;);</p>
<p>})</p>
</p>
<p>[Image Can Not Be Found]</p></p>
]]></description>
        	        	<pubDate>Mon, 13 Sep 2010 20:35:48 +0300</pubDate>
        </item>
</channel>
</rss>