<?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_element and custom_value bug with boolean values</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom_element-and-custom_value-bug-with-boolean-values</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/bugs/custom_element-and-custom_value-bug-with-boolean-values/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on custom_element and custom_value bug with boolean values</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom_element-and-custom_value-bug-with-boolean-values#p23613</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/custom_element-and-custom_value-bug-with-boolean-values#p23613</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks will be fixed today and some other minor bugs too.</p>
<p>We plan to publish 4.1.1 at end of this week.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 15 Jun 2011 12:10:50 +0300</pubDate>
        </item>
        <item>
        	<title>keithd on custom_element and custom_value bug with boolean values</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom_element-and-custom_value-bug-with-boolean-values#p23612</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/custom_element-and-custom_value-bug-with-boolean-values#p23612</guid>
        	        	<description><![CDATA[<p>Hi.&#160; I&#39;m making use of the custom_element and custom_value facility within the editoptions to create a radio button&#160;column.&#160; Data values are true, false and null and I expected the custom_element and custom_value functions to be able to convert these values into useful html content and back again.</p>
<p>This works as expected for the &#39;Yes&#39; option but not for the &#39;No&#39; option.&#160; A little digging about and I discovered this in the saveCell function:</p>
<p><span style="color: #008000;"><span style="color: #008000;"><span style="color: #000000;"></span></span></span></p>
<p><input type='button' class='sfcodeselect' name='sfselectit831' value='Select Code' data-codeid='sfcode831' /></p>
<div class='sfcode' id='sfcode831'><span style=&#34;&#34;color:&#34;><span style=&#34;&#34;color:&#34;><span style=&#34;&#34;color:&#34;>// The common approach is if nothing changed do not do anything<br />if (v2 != $t.p.savedRow[fr].v)</span></span></span></div>
</p>
<p>v2 (false) and $t.p.savedRow[fr].v (empty string) aren&#39;t equal but the != coerces the values.&#160; The != should be replaced with !== which won&#39;t coerce the value types.</p>
<p>A similar&#160;bug is also present in the&#160;$.unformat&#160;function:&#160; when using a&#160;custom function, the value is stored in a variable called&#160;ret&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit982' value='Select Code' data-codeid='sfcode982' /></p>
<div class='sfcode' id='sfcode982'>ret = unformatFunc($(cellval).text(), options, cellval);</div>
<p>the return statement then checks the value of ret and if it is false (which should be a perfectly valid return value), substitutes&#160;it with the&#160;cells html&#160;contents.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4565' value='Select Code' data-codeid='sfcode4565' /></p>
<div class='sfcode' id='sfcode4565'>return ret ? ret : cnt===true ? $(cellval).text() : $.jgrid.htmlDecode($(cellval).html());</div>
</p>
<p>Any plans to address these issues?</p></p>
]]></description>
        	        	<pubDate>Wed, 15 Jun 2011 12:01:30 +0300</pubDate>
        </item>
</channel>
</rss>