<?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: Patch for faster bulk addRowData to existing jqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid</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/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Patch for faster bulk addRowData to existing jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid#p27115</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid#p27115</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>well this is true.</p>
<p>If you do not know the addRowData can accept a array parameter which contain objects of data row . i.e instead of</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9326' value='Select Code' data-codeid='sfcode9326' /></p>
<div class='sfcode' id='sfcode9326'>
<p>for(var i=0; i&#60;adddata.length; i++)</p>
<p>{</p>
<p>&#160;&#160;&#160; $("#grid").jqGrid(&#39;addRowData&#39;, rowid, adddata[i], ...);</p>
<p>}</p>
</div>
<p>you can simple</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1551' value='Select Code' data-codeid='sfcode1551' /></p>
<div class='sfcode' id='sfcode1551'>
<p>$("#grid").jqGrid(&#39;addRowData&#39;, name_which_is_row_id, adddata, ...);</p>
</div>
<p>This will incredable speed the add process ans moreover the update pager is called only once at end of adding.</p>
</p>
<p>Best Regards</p>
]]></description>
        	        	<pubDate>Sat, 11 Aug 2012 10:55:59 +0300</pubDate>
        </item>
        <item>
        	<title>clintp on Patch for faster bulk addRowData to existing jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid#p27080</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/patch-for-faster-bulk-addrowdata-to-existing-jqgrid#p27080</guid>
        	        	<description><![CDATA[<p>I&#39;m using large tables where frequently I&#39;ll need to add lots of rows after the table has already been rendered.&#160; This can be slow and running it through a profiler shows that much of the time spent is in the AddRowData -&#62; updatepager call.&#160; This patch allows you to suspend the pager updates during row adds.&#160;&#160; (Similar to how Windows GridView and ListView widgets allow the same kind of suspend / restore).</p>
</p>
<p>Near line 728 add this default parameter for tables:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; suspendPager: false,</p>
</p>
<p>Near line 2878, change this:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; t.updatepager(true, true);</p>
<p>to this:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ( ! t.p.suspendPager ) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; t.updatepager(true, true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</p>
<p>And to use:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#mytable").setGridParam({ &#39;suspendPager&#39;: true });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; // Do bulk adds here</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#mytable").setGridParam({ &#39;suspendPager&#39;: false });</p>
</p>
<p>I hope this gets incorporated into the source, so I don&#39;t have to patch each time I update jqGrid.&#160; <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p></p>
]]></description>
        	        	<pubDate>Mon, 06 Aug 2012 17:01:18 +0300</pubDate>
        </item>
</channel>
</rss>