<?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: Bug in addRowData Method</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method</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/bugs/bug-in-addrowdata-method/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Bug in addRowData Method</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method#p31439</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method#p31439</guid>
        	        	<description><![CDATA[<p>Hi Greg,</p>
<p>I created <a href="https://github.com/tonytomov/jqGrid/pull/669" target="_blank">the pull request</a>Â based on your bug report.</p>
<p>Best regards<br />
 Oleg</p>
]]></description>
        	        	<pubDate>Wed, 10 Dec 2014 12:19:37 +0200</pubDate>
        </item>
        <item>
        	<title>greg.valainis@pa-tech.com on Bug in addRowData Method</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method#p31436</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-addrowdata-method#p31436</guid>
        	        	<description><![CDATA[<p>EDIT: bad at english and missing ';' after the 'sind = sind.rowIndex + addin' statement</p>
<p>I believe I have found a bug in the addRowData method. Â The bug occurs when using the method with pos = "after" and a subgrid exists below the row you are attempting to insert after. Â First off, when inserting 'row' the .join('') method is not used. Â Second off, the 'sind' is incrementedÂ incorrectly. Â In this case it should be incremented by two, but it is only incremented by one. Â Here is a jsFiddle link to my code:</p>
<p><a href="http://jsfiddle.net/mzrLeqqe/1/" target="_blank">http://jsfiddle.net/mzrLeqqe/1/</a></p>
<p>Used jsFiddle since I didn't really try to make the code formatted in this post. Â Below is a hard copy.</p>
<p>case 'after':<br />
 sind = $(t).jqGrid('getGridRowById', src);<br />
 if (sind) {<br />
 var addin = 1;<br />
 if ($(t.rows[sind.rowIndex + 1]).hasClass("ui-subgrid")) { $(t.rows[sind.rowIndex + 1]).after(row.join('')); addin++; }<br />
 else { $(sind).after(row.join('')); }<br />
 sind = sind.rowIndex + addin;<br />
 }<br />
 break;</p>
<p>Hope this helps.</p>
<p>I believe the version I was using version 4.6 when I discovered this, but it appeared version 4.7 did not have this fixed.</p>
]]></description>
        	        	<pubDate>Wed, 10 Dec 2014 03:53:57 +0200</pubDate>
        </item>
</channel>
</rss>