<?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: jqGrid('getGridParam', 'selRow') selects previous value</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value</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/jqgridgetgridparam-selrow-selects-previous-value/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16531</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16531</guid>
        	        	<description><![CDATA[<p>Hello</p>
<p>The problem is that your onclick fire first and then onSelectRow which selects the value.</p>
<p>You should maybe not use onclick event for the table, but rather to use the onselectRow to do this.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 19 Apr 2010 14:00:30 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16508</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16508</guid>
        	        	<description><![CDATA[<p>Hey Tony, thanks for your reply.</p>
</p>
<p>Unfortunately it changed nothing. I&#39;m still unable to fix this issue.</p>
]]></description>
        	        	<pubDate>Mon, 19 Apr 2010 11:47:16 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16477</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16477</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Right now I see. humm - Can not look at the code right now, but we bind a click to the table too.</p>
<p>Try this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit554' value='Select Code' data-codeid='sfcode554' /></p>
<div class='sfcode' id='sfcode554'>
<p>jQuery.jqGridChange = function(grid){</p>
<p>...</p>
<p>return false;</p>
<p>}</p>
</div>
]]></description>
        	        	<pubDate>Fri, 16 Apr 2010 18:42:50 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16428</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16428</guid>
        	        	<description><![CDATA[<p>My jqGrid script:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3924' value='Select Code' data-codeid='sfcode3924' /></p>
<div class='sfcode' id='sfcode3924'>var editValue; </p>
<p>jQuery(document).ready(function(){ <br />jQuery(&#39;#Tarieven-Ben&#39;).jqGrid({ <br />hidegrid: false, <br />width: 1810, <br />height: 220, <br />xmlReader: { <br />root: &#39;Grid&#39;, <br />row: &#39;Rij&#39;, <br />page: &#39;Grid&#62;Pagina&#39;, <br />total: &#39;Grid&#62;Paginas&#39;, <br />records: &#39;Grid&#62;Records&#39;, <br />repeatitems: false, <br />id: &#39;SOID&#39; <br />}, </p>
<p>url: &#39;functions/jqGridUpdate.php?bronXml=simonlies&#38;queryId=0&#38;sqlTeller=0&#38;bronXml=simonlies&#39;, <br />datatype: &#39;xml&#39;, <br />mtype: &#39;GET&#39;, <br />colNames: [&#39;ID&#39;, &#39;Volg&#39;, &#39;Provider&#39;], <br />colModel: [ <br />{name: &#39;SOID&#39;, index: &#39;SOID&#39;, width: 30, editable: false, editoptions:{readonly:false}}, <br />{name: &#39;Volgnummer&#39;, index: &#39;Volgnummer&#39;, width: 40, editable: true, editoptions:{readonly:false}}, <br />{name: &#39;Provider&#39;, index: &#39;Provider&#39;, width: 55, editable: true, editoptions:{readonly:false}}, <br />], <br />onSelectRow: function(id){ <br />if(id &#38;&#38; id!==editValue){ <br />jQuery(&#39;#Tarieven-Ben&#39;).jqGrid(&#39;editRow&#39;, id, true); <br />editValue=id; <br />} <br />}, <br />pager: &#39;#SO-Ben&#39;, <br />rowNum: 50, <br />rowList: [10, 20, 30], <br />sortname: &#39;SOID&#39;, <br />sortorder: &#39;&#39;, <br />viewrecords: true, <br />caption: &#39;SimOnlyTarieven&#39;, <br />queryId: &#39;0&#39;, <br />editurl: &#39;functions/formSave.php?bronXml=simonlies&#38;spreadsheet=1&#38;queryId=0&#38;Naam=Tarieven-Ben&#39; <br />});</p>
</div>
<p>The identification of the grid:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6086' value='Select Code' data-codeid='sfcode6086' /></p>
<div class='sfcode' id='sfcode6086'>&#60;table id=&#39;Tarieven-Ben&#39; class=&#39;jqGrid&#39; onclick=&#39;jQuery.jqGridChange(&#34;Tarieven-Ben&#34;)&#39;&#62;&#60;/table&#62;</div>
<p>Note the onclick event. Now this is what&#39;s behind that call:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit230' value='Select Code' data-codeid='sfcode230' /></p>
<div class='sfcode' id='sfcode230'>&#160;&#160;&#160; jQuery.jqGridChange = function(grid){<br />&#160;&#160; &#160;&#160;&#160; &#160;var selected = jQuery(&#34;#&#34; + grid).jqGrid(&#39;getGridParam&#39;, &#39;selrow&#39;);&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;if(jQuery.inArray(selected, recordsAangepast) == -1){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;recordsAangepast[recordsTeller] = selected;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;recordsTeller++;<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;};&#160;&#160;&#160;</div>
<p>Hope this helps.</p>
]]></description>
        	        	<pubDate>Thu, 15 Apr 2010 12:31:40 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16412</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16412</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes it will be good to post the code. Actually it depends where you call jqGrid(&#39;getGridParam&#39;, &#39;selrow&#39;).</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 14 Apr 2010 21:35:54 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on jqGrid('getGridParam', 'selRow') selects previous value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16382</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgridgetgridparam-selrow-selects-previous-value#p16382</guid>
        	        	<description><![CDATA[<p>Hey Tony,</p>
<p>I&#39;m unsure wether this is adressed before, but a few search queries on the forum lead to nothing so I&#39;ll give it a shot by creating a new topic.</p>
<p>I&#39;m using inline edit and have a custom safe function. But that all aside, when I simple alert() (triggered by onclick on jqGrid) the value that jqGrid(&#39;getGridParam&#39;, &#39;selRow&#39;) returns I always notice it&#39;s the id of the previous record. The first record I click after the page finished loading I get NULL as an result. This troubles me when I try to save my records.</p>
<p>If addition information is needed I&#39;ll post when asked. Thanks in advance.</p>
]]></description>
        	        	<pubDate>Tue, 13 Apr 2010 15:38:48 +0300</pubDate>
        </item>
</channel>
</rss>