<?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: Unformat function not called on ExpandColumn</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/unformat-function-not-called-on-expandcolumn</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/unformat-function-not-called-on-expandcolumn/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>emawind84 on Unformat function not called on ExpandColumn</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/unformat-function-not-called-on-expandcolumn#p28972</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/unformat-function-not-called-on-expandcolumn#p28972</guid>
        	        	<description><![CDATA[<p>My test:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8521' value='Select Code' data-codeid='sfcode8521' /></p>
<div class='sfcode' id='sfcode8521'>jQuery(&#34;#obsList&#34;).jqGrid({<br />&#160;&#160; &#160;&#160;&#160;&#160; ...<br />&#160;&#160; &#160;&#160;&#160;&#160; colNames:[...<br />&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160;&#160; colModel:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;_id_&#39;, hidden: true },<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;obs_name&#39;, width:180, unformat: obsNameUnFormatter },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; ...<br />&#160;&#160; &#160;&#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160;&#160; ExpandColumn : &#39;obs_name&#39;,<br />&#160;&#160; &#160;&#160;&#160;&#160; ...<br />&#160;&#160; &#160;});</div>
<p>If the column obs_name has &#39;unformat&#39; function and is the expand column, the unformat function will not be called if the function getRowData is used.</p>
<p>Temporary fix:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1510' value='Select Code' data-codeid='sfcode1510' /></p>
<div class='sfcode' id='sfcode1510'>getRowData : function( rowid ) {<br />&#160;&#160; &#160;&#160;&#160; &#160;var res = {}, resall, getall=false, len, j=0;<br />&#160;&#160; &#160;&#160;&#160; &#160;this.each(function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var $t = this,nm,ind;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(rowid === undefined) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;getall = true;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;resall = [];<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;len = $t.rows.length;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ind = $t.rows.namedItem(rowid);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(!ind) { return res; }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;len = 2;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;while(j&#60;len){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(getall) { ind = $t.rows[j]; }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( $(ind).hasClass(&#39;jqgrow&#39;) ) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;td[role=&#34;gridcell&#34;]&#39;,ind).each( function(i) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;nm = $t.p.colModel[i].name;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if ( nm !== &#39;cb&#39; &#38;&#38; nm !== &#39;subgrid&#39; &#38;&#38; nm !== &#39;rn&#39;) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if($t.p.treeGrid===true &#38;&#38; nm == $t.p.ExpandColumn) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//res[nm] = $.jgrid.htmlDecode($(&#34;span:first&#34;,this).html());<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;// ExpandColumn didn&#39;t call unformat function.<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;try {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;res[nm] = $.unformat.call($t,$(&#34;span:first&#34;,this),{rowId:ind.id, colModel:$t.p.colModel[i]},i);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} catch (e) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;res[nm] = $.jgrid.htmlDecode($(&#34;span:first&#34;,this).html());<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;try {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;res[nm] = $.unformat.call($t,this,{rowId:ind.id, colModel:$t.p.colModel[i]},i);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} catch (e){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;res[nm] = $.jgrid.htmlDecode($(this).html());<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(getall) { resall.push(res); res={}; }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;j++;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;return resall &#124;&#124; res;<br />&#160;&#160; &#160;},</div></p>
]]></description>
        	        	<pubDate>Sat, 08 Jun 2013 14:33:44 +0300</pubDate>
        </item>
</channel>
</rss>