<?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: nextCell and tab key</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/nextcell-and-tab-key</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/nextcell-and-tab-key/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>romainet on nextCell and tab key</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/nextcell-and-tab-key#p24462</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/nextcell-and-tab-key#p24462</guid>
        	        	<description><![CDATA[<p><span style="white-space: pre;"> </span>I am using datatype:"local" with cell editing and trying to modify nextCell to move to the next row if tabbing out of the last column of the previous row. The code (below) is close, however, it leaves the previous row highlighted. I have tried setSelection and resetSelection to remove the highlighting with no luck. I have also tried removeClass("ui-state-highlight").attr("aria-selected","false");&#160;with no luck. Any ideas? Also, is there a way to override nextCell as opposed to modifying jqGrid&#39;s source code? I realize the user can move the cursor to the next row and hit the enter key to accomlish the same thing. Unfortunately, our customer does not like this default behaviour.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8007' value='Select Code' data-codeid='sfcode8007' /></p>
<div class='sfcode' id='sfcode8007'>
<p>nextCell : function (iRow,iCol) {</p>
<p>return this.each(function (){</p>
<p>var $t = this, nCol=false;</p>
<p>if (!$t.grid &#124;&#124; $t.p.cellEdit !== true) {return;}</p>
<p>// try to find next editable cell</p>
<p>var done = false;</p>
<p>var rowsInGrid = $($t).jqGrid(&#34;getDataIDs&#34;);</p>
<p>for (var r=iRow; r&#60;=iRow+1; r++)</p>
<p>{</p>
<p>if ( r &#62; rowsInGrid.length  ) break;</p>
<p>if ( r != iRow )</p>
<p>{</p>
<p>$t.p.iRow = r;</p>
<p>iRow = r;</p>
<p>iCol = 0;</p>
<p>}</p>
</p>
<p>for (var i=iCol+1; i&#60;$t.p.colModel.length; i++) {</p>
<p>if ( $t.p.colModel[i].editable ===true) {</p>
<p>nCol = i; done = true; break;</p>
<p>}</p>
<p>}</p>
<p>if ( done ) break;</p>
<p>}</p>
</p>
<p>if(nCol !== false) {</p>
<p>$($t).jqGrid(&#34;editCell&#34;,iRow,nCol,true);</p>
<p>} else {</p>
<p>if ($t.p.savedRow.length &#62;0) {</p>
<p>$($t).jqGrid(&#34;saveCell&#34;,iRow,iCol);</p>
<p>}</p>
<p>}</p>
<p>});</p>
<p>},</p>
</p>
</div>
]]></description>
        	        	<pubDate>Tue, 30 Aug 2011 00:03:08 +0300</pubDate>
        </item>
</channel>
</rss>