<?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: Up/Down in Edit mode</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/updown-in-edit-mode</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/updown-in-edit-mode/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Cosmos on Up/Down in Edit mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/updown-in-edit-mode#p27568</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/updown-in-edit-mode#p27568</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I have a datagrid with only one column editable.</p>
<p>When I click on a row the cell of this column is automatically edited.</p>
</p>
<p>I would like now to have the same feature with up/down key.</p>
<p>For that I did :</p>
</p>
<p>editoptions: { dataEvents: [</p>
<p>{</p>
<p>type: &#39;keydown&#39;,</p>
<p>fn: function (e) {</p>
<p>var key = e.charCode &#124;&#124; e.keyCode;</p>
<p>var gridArr = $("#list").getDataIDs();</p>
<p>var selrow = $("#list").getGridParam("selrow");</p>
<p>var curr_index = 0;</p>
<p>if(key == 40) { //down arrow</p>
<p>for (var i = 0; i &#60; gridArr.length; i++) {</p>
<p>if (gridArr[i] == selrow)</p>
<p>curr_index = i;</p>
<p>}</p>
<p>if ((curr_index + 1) &#60; gridArr.length)</p>
<p>{</p>
<p>// $(&#39;#list&#39;).saveRow(selrow, false, &#39;clientArray&#39;);</p>
<p>$("#list").resetSelection().setSelection(gridArr[curr_index + 1], true);</p>
<p>$(&#39;#list&#39;).editRow(selrow + 1, true, null, null, &#39;clientArray&#39;, {}, null, null, null, false, null);</p>
<p>}</p>
<p>}</p>
</p>
<p>It is working for one or two lines but after the focus is on the page and not on the datagrid.</p>
</p>
<p>Thank you for your help</p></p>
]]></description>
        	        	<pubDate>Wed, 17 Oct 2012 20:48:15 +0300</pubDate>
        </item>
</channel>
</rss>