<?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: RowID parameter in addRowData does not function correctly</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly</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/rowid-parameter-in-addrowdata-does-not-function-correctly/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on RowID parameter in addRowData does not function correctly</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20117</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20117</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Please look here :</p>
<p><a href="http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-3-8-bug-ids-confused-after-column-sort-on-local-data/#p20116" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/?p" rel="nofollow">http://www.trirand.com/blog/?p</a>.....ta/#p20116</a></p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 02 Oct 2010 20:10:40 +0300</pubDate>
        </item>
        <item>
        	<title>MaximG on RowID parameter in addRowData does not function correctly</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20065</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20065</guid>
        	        	<description><![CDATA[<p>Turns out this problem gets even more interesting. Realized that after all that I had forgotten that during my</p>
<p>testing I added a column in the colModel as such</p>
</p>
<p>{&#160;name:&#160;&#39;MyRowID&#39;,&#160;index:&#160;&#39;MyRowID&#39;,&#160;hidden:&#160;true&#160;}</p>
<p>If this column doesnt exist the entire process described above again breaks. </p>
<p>This seems to be a result of the fact that if the column &#8211; for the rowid &#8211; doesnt exist in the column model it is not</p>
<p>remembered by the grid and stored in the data collection therefore on the second pass (during the reloadGrid method)</p>
<p>it loses the value (again).</p>
<p>Hopefully this makes some sense to you guys</p></p>
]]></description>
        	        	<pubDate>Wed, 29 Sep 2010 11:20:36 +0300</pubDate>
        </item>
        <item>
        	<title>MaximG on RowID parameter in addRowData does not function correctly</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20063</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20063</guid>
        	        	<description><![CDATA[</p>
<p>Ok so I worked out what was going on.</p>
</p>
<p>The problem is the $("#tableSearch").trigger("reloadGrid"); method. However this must be called<br /> to enable paging to work with local data (It does work fine once this is called)</p>
</p>
<p>The problem with the method is it causes a call to the addJSONData method which in turn contains the following line</p>
</p>
<pre><p><input type='button' class='sfcodeselect' name='sfselectit8025' value='Select Code' data-codeid='sfcode8025' /></p><div class='sfcode' id='sfcode8025'>var dReader = ts.p.datatype == &#34;local&#34; ? ts.p.localReader : ts.p.jsonReader, locid, locdata = (ts.p.datatype != &#34;local&#34; &#38;&#38; ts.p.loadonce) &#124;&#124; ts.p.datatype == &#34;jsonstring&#34;;</div><br /></pre>
<p>this is where the problem is. At this point whatever is set as your localreader id value is now<br /> being used rather then the original rowID value, hence since your object (in my case)<br /> doesnt contain the default value id a new rowid is generated and bammm your old values are <br />thrown out.</p>
<p>So basically the temp solution to this is to add the following to your original declaration</p>
<pre></pre>
<pre><p><input type='button' class='sfcodeselect' name='sfselectit154' value='Select Code' data-codeid='sfcode154' /></p><div class='sfcode' id='sfcode154'>localReader:&#160;{ id:&#160;&#34;MyRowID&#34;}</div></pre>
<p>But really this is probably a value that should get overwritten in the addRowData method??? </p>
<p> Either way its up to you guys to work out&#8230;</p>
<p> Hopefully this helps someone <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":-)" /> </p>
<p> PS: Thanks again for writing this grid&#8230; It Rocks&#8230;</p>
]]></description>
        	        	<pubDate>Wed, 29 Sep 2010 10:33:18 +0300</pubDate>
        </item>
        <item>
        	<title>MaximG on RowID parameter in addRowData does not function correctly</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20062</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/rowid-parameter-in-addrowdata-does-not-function-correctly#p20062</guid>
        	        	<description><![CDATA[<p>Code to recreate problem:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9495' value='Select Code' data-codeid='sfcode9495' /></p>
<div class='sfcode' id='sfcode9495'>&#160;$(function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#tableSearch&#34;).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#34;local&#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Type&#39;, &#39;Description&#39;, &#39;Options&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [{ name: &#39;Type&#39;, index: &#39;Type&#39;, width: 50, align: &#34;center&#34; },<br />&#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; { name: &#39;Description&#39;, index: &#39;Description&#39;, width: 230, sortable: true },<br />&#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; { name: &#39;Options&#39;, index: &#39;Options&#39;, width: 69, sortable: false}],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;type&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: &#34;desc&#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id: &#34;RowID&#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: &#34;Search&#34;,&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [10, 20, 30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#34;#divPager&#34;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridComplete: function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; function GoGoGo() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#tableSearch&#34;).clearGridData();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#tableSearch&#34;).addRowData(&#34;RowID&#34;, [{ RowID: &#34;101&#34;, Type: &#34;Type&#34;, Description: &#34;Desc&#34;, Options: &#34;Option&#34; }, { RowID: &#34;102&#34;, Type: &#34;Type&#34;, Description: &#34;Desc&#34;, Options: &#34;Option&#34;}]);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#tableSearch&#34;).trigger(&#34;reloadGrid&#34;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var test1 = $(&#34;#tableSearch&#34;).getDataIDs();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; debugger;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //Will return ID of 1 for row 1<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</div>
]]></description>
        	        	<pubDate>Wed, 29 Sep 2010 09:25:26 +0300</pubDate>
        </item>
</channel>
</rss>