<?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: Mixing server data and local data</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-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/help/mixing-server-data-and-local-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>frodeo on Mixing server data and local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p16330</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p16330</guid>
        	        	<description><![CDATA[<p>I actually got this to work with mixing json data and local data. The important thing that was missing from my last attempt it to use the id of the row when calling setRowData, not the item itself. Something like this works for me:</p>
<p style="padding-left: 30px;">var ids = $(&#39;#mygrid&#39;).getDataIDs();<br />for (var i = 0; i &#60; ids.length; i++) {<br />&#160;&#160; &#160;var item = $(&#39;#mygrid&#39;).getCell(ids[i], 0);<br />&#160;&#160; &#160;if (item === cometItem) {<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#mygrid&#39;).jqGrid(&#39;setGridParam&#39;,{datatype:&#39;local&#39;});<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#mygrid&#39;).setRowData(ids[i], rowData);<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#mygrid&#39;).jqGrid(&#39;setGridParam&#39;,{datatype:&#39;json&#39;});<br />&#160;&#160; &#160;&#160;&#160; &#160;break;<br />&#160;&#160; &#160;}<br />}</p>
]]></description>
        	        	<pubDate>Fri, 09 Apr 2010 18:06:36 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Mixing server data and local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p15727</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p15727</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Open the demo. select New in version 3.3 and the select Datatype as function</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 20:46:08 +0200</pubDate>
        </item>
        <item>
        	<title>dac60x on Mixing server data and local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p15623</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p15623</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>Thank you for your help. Could you tell me the url where can I have the examples to&#160;use datatype as function?. I couldn&#39;t find them. Thanks again.</p>
]]></description>
        	        	<pubDate>Thu, 11 Mar 2010 15:43:02 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Mixing server data and local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p14470</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p14470</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Try to use datatype as function. See examples.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 01 Feb 2010 13:05:40 +0200</pubDate>
        </item>
        <item>
        	<title>frodeo on Mixing server data and local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p14464</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/mixing-server-data-and-local-data#p14464</guid>
        	        	<description><![CDATA[<p>I have a jqgrid with datatype json that loads data from the server. We now want to add comet streaming to the grid and update the data from javascript. If we are using datatype local then we can update the grid from the comet streaming scripts by using the setRowData method. It looks like this method only works for datatype local. How can this be done when we use datatype json? (the json data from the server decides which rows to show, and we have 10.000+ rows - so switching entirely to datatype local is not an option).</p>
</p>
<p>I have tried something like this when updating the grid, but it does not work for me:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#myGrid").jqGrid(&#39;setGridParam&#39;,{datatype:&#39;local&#39;});<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#myGrid").setRowData(itemName, rowData);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#myGrid").jqGrid(&#39;setGridParam&#39;,{datatype:&#39;json&#39;});</p>
<p>Frode Oldervoll</p>
]]></description>
        	        	<pubDate>Mon, 01 Feb 2010 12:23:35 +0200</pubDate>
        </item>
</channel>
</rss>