<?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: formatter/unformat functions for checkbox</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/formatterunformat-functions-for-checkbox</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/formatterunformat-functions-for-checkbox/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on formatter/unformat functions for checkbox</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/formatterunformat-functions-for-checkbox#p9816</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/formatterunformat-functions-for-checkbox#p9816</guid>
        	        	<description><![CDATA[<p>Hello David,</p>
<p>Thanks. Fixed.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 02:36:36 +0300</pubDate>
        </item>
        <item>
        	<title>DRHansen on formatter/unformat functions for checkbox</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/formatterunformat-functions-for-checkbox#p9778</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/formatterunformat-functions-for-checkbox#p9778</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p style="padding-left: 30px;"><span style="color: #ff0000;"><strong>First off, thanks for jqGrid!</strong></span></p>
<p style="padding-left: 30px;">jqGrid version: 3.5.2.</p>
<p style="padding-left: 30px;">When using formatter/unformat functions for checkboxes the returned value currently MUST BE A STRING due to the code in grid.formedit.js</p>
<p style="padding-left: 30px;">Somewhere around line 674 the unformat is called to set tmp:</p>
<div class="sfcode" style="padding-left: 30px;">tmp = $.unformat(this,{colModel:cm[i]},i);</div>
<p style="padding-left: 30px;">Then later around line 707 in the checkbox case, the first thing that&#39;s done is</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2265' value='Select Code' data-codeid='sfcode2265' /></p>
<div class='sfcode' id='sfcode2265'>&#160;&#160;&#160; tmp = tmp.toLowerCase();</div>
<p style="padding-left: 30px;">That causes a Javascript error when the unformat code returned an integer for tmp&#160; (as I was doing) rather than a string.</p>
<p style="padding-left: 30px;">I&#39;ve since fixed my unformat code, but a simple cast to string before doing the .toLowerCase() also worked and seems a simple and reasonable fix.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3782' value='Select Code' data-codeid='sfcode3782' /></p>
<div class='sfcode' id='sfcode3782'>&#160;&#160;&#160; tmp = &#39;&#39; + tmp;</div>
<p style="padding-left: 30px;">If I&#39;m not all wrong about this, I&#39;ll be happy to put some advisory comments in the doc.</p>
<p style="padding-left: 30px;">&#160;</p>
<p>Thanks again,</p>
</p>
<p>David</p>
]]></description>
        	        	<pubDate>Wed, 16 Sep 2009 15:06:17 +0300</pubDate>
        </item>
</channel>
</rss>