<?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: Sort causes afterInsertRow to fire in 3,7?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37</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/sort-causes-afterinsertrow-to-fire-in-37/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Romyn on Sort causes afterInsertRow to fire in 3,7?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18714</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18714</guid>
        	        	<description><![CDATA[<p>Thanks Tony,</p>
</p>
<p>Adding key=true to the idx column has fixed the rowid issue out 🙂</p>
</p>
<p>However the afterInsertRow still fires for each row when the grid is sorted - is there a way to prevent that? It&#39;s not urgent as I can just test within that function whether the rowid is &#62;= to the length of the array I&#39;m filling the grid from - if it is then it&#39;s a new row ... if not then it&#39;s already there - but it would be nice if that it didn&#39;t fire at all on sorting. I suspect there must be a good reason for this happening though so testing is probably the route I should take.</p>
</p>
<p>Thanks again</p>
<p>Romyn</p>
]]></description>
        	        	<pubDate>Wed, 21 Jul 2010 15:00:44 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Sort causes afterInsertRow to fire in 3,7?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18708</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18708</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>When used this way in 3.7 you should configure your localReader in order to know which is the id</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#array_data" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....array_data</a></p>
</p>
<p>But the easy way is to set key:true in the idx column.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 21 Jul 2010 11:14:07 +0300</pubDate>
        </item>
        <item>
        	<title>Romyn on Sort causes afterInsertRow to fire in 3,7?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18705</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sort-causes-afterinsertrow-to-fire-in-37#p18705</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>I&#39;ve recently upgraded from 3.6 to 3.7 (3.7.2) and a couple of things that seemed ok previously are now doing odd things.</p>
</p>
<p>I have a simple grid that is filled from local data and as I wish the rowids to reflect to index of the array I&#39;m filling from I start it at 0. I&#39;ve done a very simple demos at</p>
<p><a onclick="javascript:pageTracker._trackPageview(&#39;/outbound/article/http://www.thekmz.co.uk/GEPlugin/wip/test/gridtest7_3.6/gridtest7_3.6.html&#39;);" href="http://www.thekmz.co.uk/GEPlugin/wip/test/gridtest7_3.6/gridtest7_3.6.html" target="_blank"></a><a href="http://www.thekmz.co.uk/GEPlug" rel="nofollow" target="_blank">http://www.thekmz.co.uk/GEPlug</a>.....7_3.6.html&#160;&#8211; for the 3.6 version</p>
<p><a rel="nofollow" href="http://www.thekmz.co.uk/GEPlugin/wip/test/gridtest7_3.7/gridtest7_3.7.html&#38;nbsp" target="_blank"></a><a href="http://www.thekmz.co.uk/GEPlugin/wip/test/gridtest7_3.7/gridtest7_3.7.html&#160;&#038;nbsp" rel="nofollow" target="_blank"><a href="http://www.thekmz.co.uk/GEPlug" rel="nofollow">http://www.thekmz.co.uk/GEPlug</a>.....&#038;nbsp</a>; &#8211; for the 3.7 version</p>
<p>and put some console.logs in there.</p>
</p>
<p>When the grid initially loads the 2 records get added and afterInsertRow is called on each one &#8211; outputting to the console the rowids 0 &#38; 1 (as expected). This happens in both 3.6 &#38; 3.7.</p>
<p>However if in the 3.7 version I sort either column the afterInsertRow event is fired twice again &#8211; one for each row but now rowids 1 &#38; 2 (not expected). In 3.6 it&#39;s ok.</p>
</p>
<p>How do I ensure that the rows keep the ids of 0 &#38; 1 and how do I prevent the afterInsertRow from firing when I do a sort.</p>
<p>I hope I&#39;m not doing something too stupid but I just can&#39;t see what&#39;s wrong.</p>
</p>
<p>Thanks</p>
<p>Romyn</p></p>
]]></description>
        	        	<pubDate>Wed, 21 Jul 2010 02:40:32 +0300</pubDate>
        </item>
</channel>
</rss>