<?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: Combine Ajax &#38; Local Data</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-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/discussion/combine-ajax-local-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29931</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29931</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Unfortunatley yes. The updatepager can be called this way.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Thu, 05 Dec 2013 12:42:51 +0200</pubDate>
        </item>
        <item>
        	<title>olegkn on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29928</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29928</guid>
        	        	<description><![CDATA[<p>Thanks! setGridparam works fine, but updatepager can use only through direct access.</p>
]]></description>
        	        	<pubDate>Thu, 05 Dec 2013 06:18:19 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29919</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29919</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>When datatype is local the page, records and total does not take in account. They are calculated within grid ( not sure if this is a good solution).</p>
<p>Your code is correct way to do this. Maybe you can use setGridparam.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 04 Dec 2013 12:23:49 +0200</pubDate>
        </item>
        <item>
        	<title>olegkn on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29912</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p29912</guid>
        	        	<description><![CDATA[<p>Hi! I need to set total pages and record count in creation grid with "datatype: &#39;local&#39;" for view pages info in pager after switch to "datatype:&#39;json&#39;".</p>
<p>Set data by "datatype: &#39;jsonstring&#39;" and "data:{&#39;page&#39;:1,&#39;total&#39;:2376,&#39;records&#39;:&#39;23754&#39;,&#39;rows&#39;:[10 rows]}" shows pages/record count from length of rows.</p>
<p>It is work if I use direct access to grid propertis, through "grid[0].p":</p>
<p style="padding-left: 30px;">&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7123' value='Select Code' data-codeid='sfcode7123' /></p>
<div class='sfcode' id='sfcode7123'>
<p style=&#34;padding-left: 30px;&#34;>var gridData = {&#39;page&#39;:1,&#39;total&#39;:2376,&#39;records&#39;:&#39;23754&#39;,&#39;rows&#39;:[10 rows]};</p>
<p style=&#34;padding-left: 30px;&#34;>var grid = $(&#39;#services&#39;).jqGrid({</p>
<p style=&#34;padding-left: 30px;&#34;>&#160;&#160;&#160; datatype: &#39;local&#39;,<br />&#160;&#160;&#160; data: gridData.rows,</p>
<p style=&#34;padding-left: 30px;&#34;>&#160;&#160;&#160; ........</p>
<p style=&#34;padding-left: 30px;&#34;>});</p>
<p style=&#34;padding-left: 30px;&#34;>grid[0].p.lastpage = gridData.total;<br />grid[0].p.records = gridData.records;<br />grid[0].updatepager(false, true);</p>
</div>
<p style="padding-left: 30px;">&#160;</p>
<p>Is it more simple and correct way to do this?</p>
]]></description>
        	        	<pubDate>Tue, 03 Dec 2013 11:45:05 +0200</pubDate>
        </item>
        <item>
        	<title>pchan on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20799</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20799</guid>
        	        	<description><![CDATA[<p>Just to complete the previous post :</p>
<p>- JQGrid with local data -- un complex Javascript object with eventually empty arrays to signify data not yet loaded</p>
<p>- User actions eg. buttons or clicking on specific cells or column header are used to set specific members of a control objet</p>
<p>- Define your own display routine that displays local data on the grid, based on the control object; whenever the display routine finds data missing, eg. when scrolled or paged, then it would use ajax to get missing data only.</p>
<p>That will get you a fantastic MVC application on the browser, the grid being the visual component, the local memory being M, and the controller decides what to show. Net traffic is reduced to the maximum, based on required data, so it&#39;s very fast.</p>
<p>The server should be asked regularly to send data that is changed (w.r.t. given dates).</p>
<p>Of course, all this is possible only with a powerful and dependable grid component !</p>
<p>Cheers!</p>
]]></description>
        	        	<pubDate>Sat, 13 Nov 2010 22:20:02 +0200</pubDate>
        </item>
        <item>
        	<title>pchan on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20621</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20621</guid>
        	        	<description><![CDATA[<p>OlegK, in my particular application where the grid is displaying lots of data in various rows and columns. When the user wants to have more detail on a specific cell (not row) by clicking it; the idea is to open up extra columns to show this extra detail. Something like a subgrid but in a vertical way. It would be wasteful to calculate and send all the existing data, including that of the extra detail; just send the extra detail would be sufficient. This reminds me of my previous applications where ajax updates only that part of the screen that needs updating.This helps to make applications that are fluid and responsive.</p>
<p>Why not update only that part of the grid that needs updating (where more detail requested by user). How would you use jqGrid to do this in a general way ? maybe using a complete MVC architecture where jqGrid is the visual component ?</p>
<p>And many thanks for discussing, OlegK.</p></p>
]]></description>
        	        	<pubDate>Mon, 01 Nov 2010 23:22:49 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20596</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20596</guid>
        	        	<description><![CDATA[<p>Sorry <strong>pchan</strong>&#160;but I don&#39;t really understand which changes in the AJAX request you need. If you need to send additional information in the AJAX request you can use /jqgridwiki/doku.php?id=wiki:options).</p>
<p>Moreover jqGrid has <a href="/jqgridwiki/doku.php?id=wiki:options" target="_blank">ajaxGridOptions</a> parameter and <a href="/jqgridwiki/doku.php?id=wiki:events#list_of_events" target="_blank">serializeGridData</a> event&#160;which allows you to replace practically any ajax parameter so you can make the most modification without changing of the grid.base.js&#160;code.</p>
<p>If all what I wrote not help you, you should post the example of the modification which you made to clear better your suggestions.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Mon, 01 Nov 2010 09:39:24 +0200</pubDate>
        </item>
        <item>
        	<title>pchan on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20592</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p20592</guid>
        	        	<description><![CDATA[<p>Hi all,</p>
<p>I&#39;ve just started to use this fantastic plugin and wish to thank everybody especially Tony.</p>
<p>This package is well integrated into DB, and even the sorting order works out-of-the-box !</p>
<p>However, it may be too much for a big application. A request would be for additional detail. A truely AJAX request would be to ask for the detail in addition to that already sent, so the grid needs to fill the new data into the required cells then show the additional column(s), somewhat similar to the goal of <strong>sternr</strong> to have local and ajax&#39;ed data. I plan to have up to many tens&#39; of additional columns.</p>
<p>To do this, I have to rewrite the populate / sortData methods in grid.base.js. Since this is deeply integrated into the grid&#39;s core, I may face heavy maintenance for every new version or well lock myself out of further changes in the trunk !</p>
<p>Is there any way out of this ?</p>
]]></description>
        	        	<pubDate>Sun, 31 Oct 2010 23:30:38 +0200</pubDate>
        </item>
        <item>
        	<title>waiting on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19864</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19864</guid>
        	        	<description><![CDATA[<p>thanks <strong>OlegK </strong>&#160; ,with your method i can save the first page&#39;data in localStorage and after load init with local data then&#160; switch to remote<strong>.<br /></strong></p>
]]></description>
        	        	<pubDate>Sun, 19 Sep 2010 05:10:30 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19546</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19546</guid>
        	        	<description><![CDATA[<p>Hi sternr,</p>
<p>It seems to me it is very simple to implement your requirements. To be able to load local json you should define <strong>data: myData</strong> and <strong>datatype: &#39;local&#39;</strong> or <strong>datastr: myJsonDataAsString</strong> and <strong>datatype: &#39;jsonstring&#39;</strong> (depend on whether you have you JSON data alredy as an object <strong>myData</strong> or as a JSON string <strong>myJsonDataAsString</strong>). After the grid is created you can imediately change the grid datatype to &#39;json&#39; with respect of setGridParam method (without calling of trigger(&#39;reloadGrid&#39;)):</p>
<p>jQuery("#list").jqGrid(&#39;setGridParam&#39;, { datatype: &#39;json&#39; });</p>
<p>Next refresh of the grid (also sorting of a column or searching) will be send to the server. If you want that switching to the server data will be a little later, you can call setGridParam later.</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Mon, 06 Sep 2010 14:08:33 +0300</pubDate>
        </item>
        <item>
        	<title>sternr on Combine Ajax &#38; Local Data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19332</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/combine-ajax-local-data#p19332</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I know you can specify an ajax data source (a url to a request with an JSON respone) or to a local JSON array.</p>
<p>But is it possible to specifiy that the first page&#39;s source is a JSON array, but subsequent requests (meaning other pages) are from the Ajax data source?</p>
</p>
<p>This could be very handy since you can render the first page&#39;s data as an array, and save the first request to the server.</p>
<p>Is this possible?</p>
</p>
<p>Thanks</p>
<p>--sternr</p>
]]></description>
        	        	<pubDate>Thu, 26 Aug 2010 12:48:09 +0300</pubDate>
        </item>
</channel>
</rss>