<?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 issue</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/custom-formatter-issue</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-formatter-issue/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>boson on custom formatter issue</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-formatter-issue#p24972</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-formatter-issue#p24972</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>As a general tip, I would like to suggest that you look at the data in options and rowObject. The easiest way is to just do console.log(options) with FireBug.</p>
</p>
<p>Boson</p>
]]></description>
        	        	<pubDate>Mon, 24 Oct 2011 23:22:24 +0300</pubDate>
        </item>
        <item>
        	<title>milad on custom formatter issue</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/custom-formatter-issue#p24956</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/custom-formatter-issue#p24956</guid>
        	        	<description><![CDATA[<p>Hello.&#160; I have written several custom formatters for columns and they are working.&#160; However, one custom formatter that is given me an issue.&#160; If I do the following, then there are no syntax errors on the page when it loads and the alert message is displayed when I hover over a column cell for this column:</p>
</p>
<p>function FormatMenu(cellValue, options, rowObject) {&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var cellHTML;<br />&#160;&#160;&#160;&#160;&#160;&#160; var spanID = &#39;spanTicker&#39; + options.rowId;</p>
<p>&#160;&#160;&#160;&#160;&#160; cellHTML = "&#60;span id=&#39;" + spanID + "&#39; onmouseover=ShowMenuNew(&#39;" + spanID + "&#39;," + options.rowId + ") onmouseout=HideMenu(&#39;&#39;)&#62;" + cellValue + " &#60;img src=&#39;/applications/images/icons/action_arrow.gif&#39; alt=&#39;&#39; /&#62;&#60;/span&#62;";</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return cellHTML;<br />&#160;&#160;&#160; }</p>
<p>function ShowMenuNew(tickerSpan, row) {</p>
<p>&#160;alert(&#39;ticker&#39;);</p>
<p>}</p>
<p>However, if I change the formatter function to pass in the rowObject or a JSON stringified version of the rowObject, I get a syntax error when the page loads:</p>
</p>
<p>function FormatMenu(cellValue, options, rowObject) {&#160; &#160;<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160; var cellHTML;<br /> &#160;&#160;&#160;&#160;&#160;&#160; var spanID = &#39;spanTicker&#39; + options.rowId;</p>
<p>&#160;&#160;&#160;&#160;&#160;  cellHTML = "&#60;span id=&#39;" + spanID + "&#39; onmouseover=ShowMenuNew(&#39;" +  spanID + "&#39;," + rowObject + ") onmouseout=HideMenu(&#39;&#39;)&#62;" + cellValue +  " &#60;img src=&#39;/applications/images/icons/action_arrow.gif&#39; alt=&#39;&#39;  /&#62;&#60;/span&#62;";</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return cellHTML;<br />&#160;&#160;&#160; }</p>
</p>
<p>Or this:</p>
</p>
<p>function FormatMenu(cellValue, options, rowObject) {&#160; &#160;<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160; var cellHTML;<br /> &#160;&#160;&#160;&#160;&#160;&#160; var spanID = &#39;spanTicker&#39; + options.rowId;</p>
<p>var rowString = JSON.stringify(rowObject);</p>
<p>cellHTML = "&#60;span  id=&#39;" + spanID + "&#39; onmouseover=ShowMenuNew(&#39;" + spanID + "&#39;,&#39;" +  rowString + "&#39;) onmouseout=HideMenu(&#39;&#39;)&#62;" + cellValue + " &#60;img  src=&#39;/applications/images/icons/action_arrow.gif&#39; alt=&#39;&#39;  /&#62;&#60;/span&#62;";</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return cellHTML;<br />&#160;&#160;&#160; }</p>
</p>
<p>Any particular reason for this?&#160; I have tried several JS escape character but have not been able to get this to work.&#160; Ideally, I would like to pass the rowObject or a JSON string of the rowObject from my formatter fucntion to the ShowMenuNew function.&#160; Any thoughts?</p>
</p>
<p>Thank.</p>
]]></description>
        	        	<pubDate>Fri, 21 Oct 2011 16:28:07 +0300</pubDate>
        </item>
</channel>
</rss>