<?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: getGridParam('selrow') gives different results before and after sorting</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting</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/getgridparamselrow-giv-different-results-before-and-after-sorting/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Getfree on getGridParam('selrow') gives different results before and after sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p31008</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p31008</guid>
        	        	<description><![CDATA[<p>Nice fix.</p>
<p>Thanks.</p>
]]></description>
        	        	<pubDate>Sat, 23 Aug 2014 01:57:27 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getGridParam('selrow') gives different results before and after sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30999</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30999</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>This is not a bug not in jqGrid itself, but it is a bug in the user provided function tableToGrid.</p>
<p>I recommend yo to get the data as array and create the grid from scratch, not using this method.</p>
<p>Note that I plan to remove this method from the build in the next release and put it in the custom methods.</p>
<p>Â </p>
<p><input type='button' class='sfcodeselect' name='sfselectit8162' value='Select Code' data-codeid='sfcode8162' /></p>
<div class='sfcode' id='sfcode8162'>
The bug is between these lines of code</p>
<p>Â Â Â  // Add data<br />
Â Â  Â var a;<br />
Â Â  Â for (a = 0; a &#60; data.length; a++) {<br />
Â Â  Â Â Â  Â var id = null;<br />
Â Â  Â Â Â  Â if (rowIds.length &#62; 0) {<br />
Â Â  Â Â Â  Â Â Â  Â id = rowIds[a];<br />
Â Â  Â Â Â  Â Â Â  Â if (id &#38;&#38; id.replace) {<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â // We have to do this since the value of a checkbox<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â // or radio button can be anything<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â id = encodeURIComponent(id).replace(/[.\-%]/g, "_");<br />
Â Â  Â Â Â  Â Â Â  Â }<br />
Â Â  Â Â Â  Â }<br />
Â Â  Â Â Â  Â if (id === null) {<br />
Â Â  Â Â Â  Â Â Â  Â id = a + 1;<br />
Â Â  Â Â Â  Â }<br />
Â Â  Â Â Â  Â jQuery(this).jqGrid("addRowData",id, data[a]);<br />
Â Â  Â }</p>
</div>
<p>Â </p>
<p>Comment this fragment and one step above change the setting to:</p>
<p>Â </p>
<p><input type='button' class='sfcodeselect' name='sfselectit7963' value='Select Code' data-codeid='sfcode7963' /></p>
<div class='sfcode' id='sfcode7963'>
Â  jQuery(this).jqGrid(jQuery.extend({<br />
Â Â  Â Â Â  Â datatype: "local",</p>
<p>Â Â Â Â Â Â Â  data :Â  data,</p>
<p>Â Â  Â Â Â  Â width: w,<br />
Â Â  Â Â Â  Â colNames: colNames,<br />
Â Â  Â Â Â  Â colModel: colModel,<br />
Â Â  Â Â Â  Â multiselect: selectMultiple<br />
Â Â  Â Â Â  Â //inputName: inputName,<br />
Â Â  Â Â Â  Â //inputValueCol: imputName != null ? "__selection__" : null<br />
Â Â  Â }, options &#124;&#124; {}));</p>
</div>
]]></description>
        	        	<pubDate>Thu, 21 Aug 2014 16:52:25 +0300</pubDate>
        </item>
        <item>
        	<title>Getfree on getGridParam('selrow') gives different results before and after sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30988</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30988</guid>
        	        	<description><![CDATA[<p>I made a jsfiddle where you can reproduce the problem.</p>
<p><a href="http://jsfiddle.net/wnL0z2mc/" rel="nofollow" target="_blank">http://jsfiddle.net/wnL0z2mc/</a></p>
]]></description>
        	        	<pubDate>Wed, 20 Aug 2014 20:53:16 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getGridParam('selrow') gives different results before and after sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30985</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30985</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>If you useÂ  key true the id shouldcome from that row.</p>
<p>Will be interesting from me if you put online example or post a code with some data.</p>
<p>Â </p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 20 Aug 2014 16:58:02 +0300</pubDate>
        </item>
        <item>
        	<title>Getfree on getGridParam('selrow') gives different results before and after sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30983</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getgridparamselrow-giv-different-results-before-and-after-sorting#p30983</guid>
        	        	<description><![CDATA[<p>The method call <strong>$('...').getGridParam('selrow')</strong>Â gives the sequential ID of the selected row if the grid is not sorted.</p>
<p>But after you sort by any column, it gives the primary key column of the seleced row (the one with <strong>{key: true}</strong> in the colModel).</p>
<p>Is there some configuration parameter or somethingÂ to preventÂ this inconsistency?</p>
<p>I'm creating the grid from an HTML table using the functionÂ <strong>tableToGrid</strong>.</p>
]]></description>
        	        	<pubDate>Wed, 20 Aug 2014 15:04:53 +0300</pubDate>
        </item>
</channel>
</rss>