<?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: Select element text in cell edit mode</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-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/feature-request/select-element-text-in-cell-edit-mode/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Select element text in cell edit mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16463</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16463</guid>
        	        	<description><![CDATA[<p>Hello ben,</p>
<p>Thanks. As you said we should provide mechanisms and not ready solutions. Let say that after some time another user want that they want not to select a value</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 16 Apr 2010 17:04:14 +0300</pubDate>
        </item>
        <item>
        	<title>ben on Select element text in cell edit mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16362</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16362</guid>
        	        	<description><![CDATA[</p>
<p>If I read you correctly, you should be able to achieve the desired effect without needing to alter jqgrid&#39;s code by adding an afterEditCell event handler.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8172' value='Select Code' data-codeid='sfcode8172' /></p>
<div class='sfcode' id='sfcode8172'>afterEditCell: function afterEditCell(rowID, cellname, value, iRow, iCol) {<br />&#160;$(&#34;#&#34; + this.id + &#34; tbody&#62;tr:eq(&#34; + iRow + &#34;)&#62;td:eq(&#34; + iCol + &#34;) input, select, textarea&#34;).select();<br />}</div>
</p>
<p>On the other hand, one might want to have a more excel-like behaviour (we&#39;re talking of data grids after all) and place the caret depending on where the user clicked.</p>
<p>Therefore, I&#39;m not really confident selecting the content of a cell after it starts being edited is the most "standard" or most ergonomic behavior from a user perspective. It probably depends of what kind of data is being edited and how the user wants to edit it (e.g. not placeing the caret where the user clicked would be painful to the user if all he wants is to correct a spelling mistake on the 12th character of a 20 characters string).</p>
<p>But we probably both agree the current behavior (just enter "edit" mode) is the least ergonomic.</p>
<p>Still, as it is a common denominator, it seems quite appropriate.</p>
]]></description>
        	        	<pubDate>Mon, 12 Apr 2010 16:59:11 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on Select element text in cell edit mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16023</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p16023</guid>
        	        	<description><![CDATA[<p>I was just thinking of a way to archieve this when I came across your topic. Obviously I would be intrested in more of your changes to the code, and maybe some others as well.</p>
</p>
<p>However, I&#39;d like to see this as an future option in jqGrid. The exact same argument on why the OP wanted to archieve this can be applied to my company.</p>
]]></description>
        	        	<pubDate>Mon, 29 Mar 2010 13:47:11 +0300</pubDate>
        </item>
        <item>
        	<title>dw on Select element text in cell edit mode</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p15338</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/select-element-text-in-cell-edit-mode#p15338</guid>
        	        	<description><![CDATA[</p>
<p>With inline edit mode as the user tabs through the input elements, the current value of the element is selected.&#160; With cell editing mode the current value is not selected.&#160; This can be painful for users editing the data in a grid as they have to manually select the text to replace the value.&#160; It would be&#160;nice if the text was automatically selected when the user selects the cell to edit.</p>
</p>
<p>This seemed like it should be as easy as changing the following line in editCell function grid.celledit.js</p>
<p>
<span style="font-size: x-small;"></span></p>
<p><input type='button' class='sfcodeselect' name='sfselectit5741' value='Select Code' data-codeid='sfcode5741' /></p>
<div class='sfcode' id='sfcode5741'>
<p><span style=&#34;font-size: x-small;&#34;></span><span style=&#34;font-size: x-small; color: #0000ff;&#34;>function</span><span style=&#34;font-size: x-small;&#34;> () { $(elc).focus();},0);</span></p>
<p>window.setTimeout(</p>
<p>&#160;change to:</p>
<p><span style=&#34;font-size: x-small;&#34;><span style=&#34;font-size: x-small;&#34;>window.setTimeout(</span><span style=&#34;font-size: x-small; color: #0000ff;&#34;>function</span><span style=&#34;font-size: x-small;&#34;> () { $(elc).focus();$(elc).select();},0);</span></span></p>
</div>
<p><span style="font-size: x-small;"><span style="font-size: x-small;">However, it actually took quite a bit more changes to make the focus stay on the element at the right times.&#160; And for some reason IE seemed to need a delay built into the setTimeout call to make this work in all scenarios.&#160; If you would like the code,&#160;I can post it, but&#160;I am sure it can probably be done better.&#160; </span></span></p>
<p><span style="font-size: x-small;">Thanks for considering the change!</span></p>
</p>
<p><span style="font-size: x-small;"></span></p>
<p><span style="font-size: x-small;"></span></p>
]]></description>
        	        	<pubDate>Wed, 03 Mar 2010 18:18:11 +0200</pubDate>
        </item>
</channel>
</rss>