<?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: empty cell content before edit</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit</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/empty-cell-content-before-edit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>vctw on empty cell content before edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12235</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12235</guid>
        	        	<description><![CDATA[<p>Thanks for your tip. It&#39;s strange that won&#39;t work for me. I am using 3.5.3. After google around, I found something work for me. Post here in case somebody also need this.</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; afterEditCell : function(rowid, cellname, value, iRow, iCol) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $("#sales tr[id=&#39;"+rowid+"&#39;] td:eq("+iCol+") input").val("");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},</p>
<p>BTW: cell property like this <strong>editable:true,edittype:&#39;text&#39;</strong></p>
]]></description>
        	        	<pubDate>Fri, 20 Nov 2009 12:19:06 +0200</pubDate>
        </item>
        <item>
        	<title>dinoboy on empty cell content before edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12218</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12218</guid>
        	        	<description><![CDATA[<p>I used <a href="/jqgridwiki/doku.php?id=wiki:inline_editing&#38;s[]=editrow" target="_blank">editRow</a> method to edit my rows and in <em>oneditfunc</em> I reset the input value like this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6442' value='Select Code' data-codeid='sfcode6442' /></p>
<div class='sfcode' id='sfcode6442'>function editRow(rowId) {<br />&#160; $(&#39;#mygrid&#39;).editRow(rowId, true, function() {<br />&#160;&#160;&#160; var input = $(&#39;#&#39; + rowId + &#39;_yourColumnName&#39;);<br />&#160;&#160;&#160; input.val(null);<br />&#160; });<br />}</div>
<p>You can also access the original value if needed, like this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6282' value='Select Code' data-codeid='sfcode6282' /></p>
<div class='sfcode' id='sfcode6282'>var originalValue = input.parent().attr(&#39;title&#39;);</div>
<p>Because cells values are also stored in the &#60;td&#62; title attribute.</p>
<p>If you want this behavior to be applied to all columns, you can iterate over all the visible columns or just ask all inputs from the given &#60;tr&#62; by using jQuery.</p>
]]></description>
        	        	<pubDate>Fri, 20 Nov 2009 03:45:04 +0200</pubDate>
        </item>
        <item>
        	<title>vctw on empty cell content before edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12208</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/empty-cell-content-before-edit#p12208</guid>
        	        	<description><![CDATA[<p>Hi, all</p>
<p>I tried to empty cell content before edit it, here is my code</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; formatCell: function(rowid, cellname, value, iRow, iCol) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $(&#39;#mygrid&#39;).setCell(rowid,cellname,null,null,null);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; },</p>
<p>I also tried beforeEditCell event, both event triggered. But the cell still has old value while editing, not a empty cell I expect.</p>
<p>How can I get a empty cell while editing, so I don&#39;t have to delete old value first?</p>
</p>
<p>Thanks,</p></p>
]]></description>
        	        	<pubDate>Thu, 19 Nov 2009 19:10:28 +0200</pubDate>
        </item>
</channel>
</rss>