<?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 formatter function always returns string</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom-formatter-function-always-returns-string</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-formatter-function-always-returns-string/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on custom formatter function always returns string</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom-formatter-function-always-returns-string#p10909</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/custom-formatter-function-always-returns-string#p10909</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks - it is a bug in jgrid.stripHtml function. Fixed in GitHub</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 21 Oct 2009 02:25:46 +0300</pubDate>
        </item>
        <item>
        	<title>sand123 on custom formatter function always returns string</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/custom-formatter-function-always-returns-string#p10867</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/custom-formatter-function-always-returns-string#p10867</guid>
        	        	<description><![CDATA[<p>I use such function as &#39;formatter&#39; for column:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8248' value='Select Code' data-codeid='sfcode8248' /></p>
<div class='sfcode' id='sfcode8248'>function (cellvalue, options, rowdata) {<br />&#160;&#160; if(cellvalue == 0)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return &#39;&#60;b&#62;&#39; + cellvalue + &#39;&#60;/b&#62;&#39;;<br />&#160;&#160;&#160; else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return cellvalue;<br />}</div>
<p>i.e if value is zero, then bold it, else &#8211; return the same.</p>
<p>Firebug shows that &#39;cellvalue&#39; passed as numeric &#8211; and i got error &#39;v.replace is not a function&#39; in jqgrid.js (3.5.2).</p>
<p>I didn&#39;t found it in documentation, but It works only if return value always converted to string, so use</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8810' value='Select Code' data-codeid='sfcode8810' /></p>
<div class='sfcode' id='sfcode8810'>return cellvalue.toString()</div>
]]></description>
        	        	<pubDate>Tue, 20 Oct 2009 03:46:28 +0300</pubDate>
        </item>
</channel>
</rss>