<?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: How to access row data in custom formatter?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-access-row-data-in-custom-formatter</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/how-to-access-row-data-in-custom-formatter/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on How to access row data in custom formatter?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-access-row-data-in-custom-formatter#p12343</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-access-row-data-in-custom-formatter#p12343</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>There is a bug for this which is corrected in 3.6.1 relesee.</p>
<p>Thanks</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 23 Nov 2009 11:39:31 +0200</pubDate>
        </item>
        <item>
        	<title>jackysee on How to access row data in custom formatter?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-access-row-data-in-custom-formatter#p12310</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-access-row-data-in-custom-formatter#p12310</guid>
        	        	<description><![CDATA[<p>I&#39;m using jqgrid 3.5.3.</p>
<p>I want to create a custom formatter to display link so that I can set a url link "/abc.php?action=abc&#38;id={id}&#38;type={type}" and it will create a link to replace those {xx} with cell value. I found that I can only get cellvalue and rowid. The third parameter rowdata is actually not what it meant. I do a console.log(rowdata), it returns a string "add" but I have no clues on what it is. The only solution I found is to pass the grid id in formatoptions.</p>
<p>ColModel:<br />&#160;{name:&#39;id&#39;, index:&#39;id&#39;, width:30, editable:false, formatter:&#39;linkbtn&#39;, formatoptions:{url:&#39;/abc.php?action=abc&#38;id={id}&#38;type={type}&#39;}},</p>
<p>Formatter:<br />$.extend(true, $.fn.fmatter,{<br />&#160;&#160; &#160;&#160;&#160;&#160; linkbtn: function(cellvalue, options, rowdata){<br />&#160;&#160; &#160;&#160;&#160;&#160; &#160;&#160;&#160; var opt = options.colModel.formoptions;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var url = (opt.url)?"#":opt.url.replace("{id}", options.rowId); //and what about other cell value??<br />&#160;&#160; &#160;&#160;&#160;&#160; &#160;&#160;&#160; return &#39;&#60;a href="&#39;+url+&#39;" class="linkBtn"&#62;View&#60;/a&#62;&#39;;<br />&#160;&#160; &#160;&#160;&#160;&#160; }</p>
<p>}</p>
]]></description>
        	        	<pubDate>Sun, 22 Nov 2009 22:05:00 +0200</pubDate>
        </item>
</channel>
</rss>