<?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: JSONString vs. URL</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url</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/jsonstring-vs-url/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>CaptainPalapa on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p17046</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p17046</guid>
        	        	<description><![CDATA[<blockquote>
<p>macbuoy said:</p>
<div>
<p>...</p>
<p>Is there some reason I should use the setTimeout() instead?</p>
</div>
</blockquote>
<hr />
<p>In my testing, I never needed it. &#160;I just used one of the callback functions (can&#39;t remember them now) that after my load, I just flipped it back. &#160;Wasn&#39;t any need for the timeout.</p>
]]></description>
        	        	<pubDate>Tue, 11 May 2010 00:43:56 +0300</pubDate>
        </item>
        <item>
        	<title>macbuoy on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p17043</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p17043</guid>
        	        	<description><![CDATA[<div>
<p>In Tony&#39;s solution, will setting the datatype back to "json" work via the gridComplete event like this:</p>
<p>$("#mygrid").jqGrid({</p>
<p>url:&#39;url_to_the_server_json_data&#39;,</p>
<p>datatype:&#39;jsonstring&#39;</p>
<p>datastr: actual_string_data_here,</p>
<p><strong>gridComplete: function(){$("#mygrid").jqGrid(&#39;setGridParam&#39;,{datatype:&#39;json&#39;}); }</strong></p>
<p>&#8230;</p>
<p>});</p>
<p>Is there some reason I should use the setTimeout() instead?</p>
</div>
]]></description>
        	        	<pubDate>Tue, 11 May 2010 00:04:09 +0300</pubDate>
        </item>
        <item>
        	<title>CaptainPalapa on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11800</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11800</guid>
        	        	<description><![CDATA[<p>Thanks, Tony. &#160;I had dome quite a bit of searching, but didn&#39;t stumble across the answer.</p>
</p>
<p>I had actually tried this same concept, unsuccessfully. &#160;I didn&#39;t utilize correct format, though, for:</p>
<p><strong>$(&#8221;#mygrid&#8221;).jqGrid(&#39;setGridParam&#39;,{datatype:&#39;json&#39;});&#160;</strong></p>
</p>
<p>But definitely working now. &#160;Exactly what I needed!</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 09:29:09 +0200</pubDate>
        </item>
        <item>
        	<title>tony on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11785</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11785</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>IMHO There is a easy way and the solution is posted here many times</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2431' value='Select Code' data-codeid='sfcode2431' /></p>
<div class='sfcode' id='sfcode2431'>
<p>$("#mygrid").jqGrid({</p>
<p>url:&#39;url_to_the_server_json_data&#39;,</p>
<p>datatype:&#39;jsonstring&#39;</p>
<p>datastr: actual_string_data_here,</p>
<p>...</p>
<p>})</p>
<p>// If your string data is relative big, make a settimeout to ensure that the new option will work</p>
<p>setTimeout(function() {$("#mygrid").jqGrid(&#39;setGridParam&#39;,{datatype:&#39;json&#39;}); },50);</p>
<p>// now you are ready to accept server requests</p>
</div>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 11 Nov 2009 03:48:48 +0200</pubDate>
        </item>
        <item>
        	<title>montag on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11760</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11760</guid>
        	        	<description><![CDATA[<p>I was thinking through the same problem last week and i solved it like this. Start out with your datatype set to a function, that loads your initial data via "$table[0].addJSONData(initialResults)", and then make that same function overwrite the datatype property [itself].</p>
<p>var url = "/researchCatalog/Search/ProviderGridData/";<br />var gridData = getGridData(url, searchParams)<br />var colModel = gridData.colModel;<br />var initialResults = gridData.initialResults;<br />var datatype = function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //there&#39;s a little bit of trickery going on in this function <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //so that we can create a jqGrid with initial results,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //and also hook into all of the auto AJAXy stuff built into the grid<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //when initially creating the grid we use a function as the datatype,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //but in the function we reset the grids datatype to json<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $table[0].addJSONData(initialResults)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //reset the datatype variable to json so it will make calls on its own<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $table.setGridParam({ datatype: "json" });</p>
<p>}</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $table.jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: url,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: datatype,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: colModel,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pagerpos: &#39;left&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: $("#" + pagerID),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pgbuttons: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridComplete: function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; RSCat.ContentManager.resizeGrid($table);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 16:53:42 +0200</pubDate>
        </item>
        <item>
        	<title>CaptainPalapa on JSONString vs. URL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11756</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jsonstring-vs-url#p11756</guid>
        	        	<description><![CDATA[<p>I see the note:</p>
<p>"If you use a jsonstring to obtain the data - after the data is retrieved the datatype option automatically is set to local - i.e. (currently) the paging will not work!"</p>
</p>
<p>I had been hoping, when doing our test setup with jqGrid, that I&#39;d be able to "preload" the first, say, 10 records of a dataset to avoid the inital Ajax call.&#160; Then, using the pager, you&#39;d go to page 2, and the Ajax call would occur.</p>
</p>
<p>Is this possible?&#160; Even based on that note, is there a way to override that functionality in some format?&#160; Direct hit to the object, anything?</p>
</p>
<p>- WB</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 14:43:28 +0200</pubDate>
        </item>
</channel>
</rss>