<?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: Trying to edit and save a cell with empty content</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content</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/trying-to-edit-and-save-a-cell-with-empty-content/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>gseroul on Trying to edit and save a cell with empty content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p18290</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p18290</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>Unfortunately this correction may introduced a bug : I have in my grid some empty cell (date). But when I edit a row and save the empty cell value is not &#39;&#39; but &#39;&#38;nbsp;&#39; =&#62; then saving this as a date give me an error in my DB. If a field is null we should keep it at null no ?</p></p>
]]></description>
        	        	<pubDate>Wed, 30 Jun 2010 14:52:07 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Trying to edit and save a cell with empty content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8876</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8876</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks I have fixed this bug in cellEdit in gitHub.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 21 Aug 2009 03:00:52 +0300</pubDate>
        </item>
        <item>
        	<title>nisse on Trying to edit and save a cell with empty content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8819</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8819</guid>
        	        	<description><![CDATA[<p>Thank you!</p>
<p>Your solution worked out fine. But I used:</p>
<p>if (value == &#8220;&#8221; ) return &#8220; &#8221;;&#160;</p>
<p>instead of</p>
<p>if (value == &#8220;&#8221; ) return &#8220;&#38;nbsp;&#8221;;&#160;</p>
</p>
<p>Regards</p>
</p>
<p>Nisse</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 14:22:29 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Trying to edit and save a cell with empty content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8796</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8796</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This is because we use setCell to store the value and if it is empty we do not set the new value.</p>
<p>Now maybe you should use beforeSaveCell to do this - something like</p>
<p>beforeSaveCell : function (rowid,colName, value, iRow,iCol) {</p>
<p>if (value == "" ) return "&#38;nbsp;";</p>
<p>else return value;</p>
<p>}</p>
<p>Also some other note - if you save the value to the server check if you handle empty values.</p>
<p>Best Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 07:00:59 +0300</pubDate>
        </item>
        <item>
        	<title>nisse on Trying to edit and save a cell with empty content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8763</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trying-to-edit-and-save-a-cell-with-empty-content#p8763</guid>
        	        	<description><![CDATA[<p>Hello!</p>
<p>I have tried searching for this problem on this forum and inside the documentation, but have not found an answer for the following:</p>
<p>I am using jqgrid and the cellEdit feature. And it works quite well.</p>
<p>Now, I am wondering if the following is a default configuration or a bug:</p>
<p>Whenever I edit a cell that loads with a value and change it to nothing, it comes back to the previous value!</p>
<p>Example</p>
<p>Before: "test"<br />Change to: "test2"<br />Result after refresh: "test2"<br />That is, as expected</p>
<p>but the following is not what I want</p>
<p>Before: "test"<br />Change to: "" &#60;-- nothing<br />Result after refresh: "test"<br />That is, not what I expected or want. I would like the cell to be empty!</p>
<p>I have tried the following:</p>
<p>-----------------------------------------<br />afterSaveCell:function(rowid,fieldname,value,iRow,iCol){<br />&#160;&#160;if(value == &#39;&#39;) {<br />&#160;&#160;alert("empty!");<br />&#160;&#160;jQuery("#list").setCell(rowid,fieldname,"&#38;nbsp;");<br />&#160;&#160;&#160;<br />&#160;&#160;}<br />},<br />-----------------------------------------</p>
<p>I have also tried, undefined or null, but still does not work</p>
<p>And the alert works when I leave the cell empty, so it seems like it is intercepted correctly, but when I refresh the previous content of the cell comes back!!</p>
<p>How do I change that?</p>
<p>Thanks</p>
<p>nisse</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 01:22:00 +0300</pubDate>
        </item>
</channel>
</rss>