<?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: CellEdit Nav Doesn't Move to Next/Prev Row</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row</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/celledit-nav-doesnt-move-to-nextprev-row/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ComIT Solutions on CellEdit Nav Doesn't Move to Next/Prev Row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29429</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29429</guid>
        	        	<description><![CDATA[</p>
<p>Hi <strong>zardoz</strong>,</p>
</p>
<p>Nice work, while finding next and previous editable cell, wouldn&#39;t it be &#160;ideal if we consider the hidden columns also&#160;(by mistake if a hidden column is set editable:true) .</p>
<p>like .</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8794' value='Select Code' data-codeid='sfcode8794' /></p>
<div class='sfcode' id='sfcode8794'>
<p>if ($t.p.colModel[i].editable === true &#38;&#38; $t.p.colModel[i].hidden === false&#160;) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; nCol = i;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</div>
<p>and how about adding a new row when enter-key is pressed and last editable cell of last row .</p>
<p>When we tried to do that, we were able to add new row using grid.jqGrid("addRowData",defcolValues,last);, but &#160;that row opened in in-line edit mode that is all the editable coulmns are showing textboxes and could not continue that row in cellEdit mode.</p>
</p>
<p>Any idea or guidelines are deeply appriciated.</p>
<p>thanks and best regards.</p>
<p>ComIT Solutions&#160;</p>
]]></description>
        	        	<pubDate>Sat, 31 Aug 2013 09:13:31 +0300</pubDate>
        </item>
        <item>
        	<title>tony on CellEdit Nav Doesn't Move to Next/Prev Row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29240</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29240</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Thank you very much for sharing your code.</p>
<p>Certainly I will test this and will make decision if I will include it.</p>
</p>
<p>Thanks again. I&#160; think that this is the way to help more people.</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 31 Jul 2013 13:48:48 +0300</pubDate>
        </item>
        <item>
        	<title>zardoz on CellEdit Nav Doesn't Move to Next/Prev Row</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29237</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/celledit-nav-doesnt-move-to-nextprev-row#p29237</guid>
        	        	<description><![CDATA[<p>Howdy,</p>
<p>I did some modifications to the NextCell/PrevCell methods so that when in CellEdit mode, tab moves to the next row when it&#39;s reached the end of the current row (and vice-versa for shift+tab). This is sorta half bug, half feature request, but it certainly makes large scale data entry easier.</p>
</p>
<p>Here&#39;s the code<span style="color: #888888;">:</span></p>
<p><span style="color: #888888;">&#160;</span></p>
<p><input type='button' class='sfcodeselect' name='sfselectit1523' value='Select Code' data-codeid='sfcode1523' /></p>
<div class='sfcode' id='sfcode1523'>
<p><span style=&#34;white-space: pre;&#34;> </span>nextCell: function (iRow, iCol) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return this.each(function () {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var $t = this, nCol = false, i;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (!$t.grid &#124;&#124; $t.p.cellEdit !== true) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // try to find next editable cell</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (iCol + 1 != $t.p.colModel.length) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = iCol + 1;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (iRow == $t.p.reccount) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = 0;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iRow++;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (i; i &#60; $t.p.colModel.length; i++) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;if ($t.p.colModel[i].editable === true) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; nCol = i;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (i == $t.p.colModel.length - 1) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = 0;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iRow++;</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (nCol !== false) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $($t).jqGrid(&#34;editCell&#34;, iRow, nCol, true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($t.p.savedRow.length &#62; 0) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $($t).jqGrid(&#34;saveCell&#34;, iRow, iCol);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
</div>
<p><span style="white-space: pre;"> </span>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2908' value='Select Code' data-codeid='sfcode2908' /></p>
<div class='sfcode' id='sfcode2908'>
<p><span style=&#34;white-space: pre;&#34;> </span>prevCell: function (iRow, iCol) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return this.each(function () {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var $t = this, nCol = false, i;</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (!$t.grid &#124;&#124; $t.p.cellEdit !== true) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // try to find next editable cell</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (iCol != 0) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = iCol - 1;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (iRow == 1) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = $t.p.colModel.length - 1;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iRow--;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (i; i &#62;= 0; i--) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($t.p.colModel[i].editable === true) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; nCol = i;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (i == 0) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; i = $t.p.colModel.length - 1;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iRow--;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (nCol !== false) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $($t).jqGrid(&#34;editCell&#34;, iRow, nCol, true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($t.p.savedRow.length &#62; 0) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;$($t).jqGrid(&#34;saveCell&#34;, iRow, iCol);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
</div>
<p>I also added a prevent default into the tab key event into the only usage of next cell (around line 9900 of the 4.5.2 src.js file), so that pressing tab doesn&#39;t launch whatever scrollable div the grid is in to the top:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9780' value='Select Code' data-codeid='sfcode9780' /></p>
<div class='sfcode' id='sfcode9780'>
<p>if (e.keyCode === 9)&#160; {</p>
<p>&#160;&#160;&#160; if(!$t.grid.hDiv.loading ) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; //EDIT</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.preventDefault();</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (e.shiftKey) {$($t).jqGrid(&#34;prevCell&#34;,iRow,iCol);} //Shift TAb</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; else {$($t).jqGrid(&#34;nextCell&#34;,iRow,iCol);} //Tab</p>
<p>&#160;&#160;&#160; } else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return false;</p>
<p>&#160;&#160;&#160; }</p>
<p>}</p>
</div>
<p>Hope this helps someone.</p>
</p>
<p>PS: This is my first post here. I&#39;ve been using this as a resource for months, so I thought I&#39;d try to contribute something. Thanks for all your help!</p>
]]></description>
        	        	<pubDate>Tue, 30 Jul 2013 22:50:39 +0300</pubDate>
        </item>
</channel>
</rss>