<?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: custom unformatting not always working in edit form</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/custom-unformatting-not-always-working-in-edit-form</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/custom-unformatting-not-always-working-in-edit-form/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ember on custom unformatting not always working in edit form</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-unformatting-not-always-working-in-edit-form#p16731</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-unformatting-not-always-working-in-edit-form#p16731</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I&#39;m using the custom formatter and unformat for some currency and % columns.&#160;</p>
<p>There seems to be a problem when my custom unformat returns an empty string.&#160; I really would like the field to be empty in the form, but I&#39;d like to display a formatted empty value in the grid.&#160; Is there something else I can return besides "" to get it to work and show an empty field?</p>
<p>This "works" by putting 0 in the field on the form (but I&#39;d really like an empty string):</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit855' value='Select Code' data-codeid='sfcode855' /></p>
<div class='sfcode' id='sfcode855'>function&#160; unfmatCurrency2 (cellvalue){<br />&#160;&#160; &#160;if (cellvalue == &#34;$ ---&#34;) {<br />&#160;&#160; &#160;&#160;&#160; &#160;return &#34;0&#34;;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;else {<br />&#160;&#160; &#160;&#160;&#160; &#160;return cellvalue.replace(&#34;$ &#34;, &#34;&#34;);&#160;&#160; &#160;<br />&#160;&#160; &#160;}<br />}</div>
<p>This does not work, because my form field is still "$ ---" instead of an empty string (which is what I want):</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4919' value='Select Code' data-codeid='sfcode4919' /></p>
<div class='sfcode' id='sfcode4919'>function&#160; unfmatCurrency2 (cellvalue){<br />&#160;&#160; &#160;if (cellvalue == &#34;$ ---&#34;) {<br />&#160;&#160; &#160;&#160;&#160; &#160;return &#34;&#34;;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;else {<br />&#160;&#160; &#160;&#160;&#160; &#160;return cellvalue.replace(&#34;$ &#34;, &#34;&#34;);&#160;&#160; &#160;<br />&#160;&#160; &#160;}<br />}
</div>
<p>Thanks!</p>
<p>Ember</p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 22:30:54 +0300</pubDate>
        </item>
</channel>
</rss>