<?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: Index for local data getting overwritten instead of replaced after delRowDta</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta</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/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Index for local data getting overwritten instead of replaced after delRowDta</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta#p31260</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta#p31260</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Thanks. Fixed in Git</p>
<p>Â </p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 21 Oct 2014 17:32:39 +0300</pubDate>
        </item>
        <item>
        	<title>rtamura on Index for local data getting overwritten instead of replaced after delRowDta</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta#p31204</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/index-for-local-data-getting-overwritten-instead-of-replaced-after-delrowdta#p31204</guid>
        	        	<description><![CDATA[<p>I have local data delete functionality:</p>
<p>$.each(rowids, function() { // - delete selected rows<br />
 $grid.delRowData(this);<br />
 });</p>
<p>I noticed that after this call, doing retrieving the _index:</p>
<p>var xref = $grid.jqGrid('getGridParam', '_index');</p>
<p>the _index still contains the deleted row.</p>
<p>I looked into the JQGrid source, after the deletion of the local data, a call to refreshIndex() is made. I noticed that the Index is not removed, but rather the existing array is overwritten:</p>
<p>for (i = 0; i &#60; datalen; i++) {<br />
 val = $.jgrid.getAccessor(ts.p.data[i], idname);<br />
 if (val === undefined) { val = String(i + 1); }<br />
 ts.p._index[val] = i;<br />
 }</p>
<p>I added the following right before the loop above:</p>
<p>ts.p._index = [];</p>
]]></description>
        	        	<pubDate>Mon, 06 Oct 2014 16:37:26 +0300</pubDate>
        </item>
</channel>
</rss>