<?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: setGridWidth not working here</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/setgridwidth-not-working-here</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/discussion/setgridwidth-not-working-here/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mudpunch on setGridWidth not working here</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/setgridwidth-not-working-here#p25998</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/setgridwidth-not-working-here#p25998</guid>
        	        	<description><![CDATA[</p>
<p>This is how I call the function (mind you, I&#39;ve tried in many ways):</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4178' value='Select Code' data-codeid='sfcode4178' /></p>
<div class='sfcode' id='sfcode4178'>
<p>$(document).bind(&#39;gridExpand&#39;, function () {</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>gridObj = $(&#39;div.panes .pane:visible&#39;).find(&#39;div.ui-jqgrid&#39;);</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>gridParentWidth = gridObj.parent().width();</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>gridObj.jqGrid(&#39;setGridWidth&#39;, gridParentWidth); &#160; &#160; &#160; &#160; &#160;&#160;</p>
<p>});</p>
</div>
<p>In the setGridWidth function, <span style="text-decoration: underline;">nwidth</span> is received without problems. However, it stops at the first condition:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5357' value='Select Code' data-codeid='sfcode5357' /></p>
<div class='sfcode' id='sfcode5357'>
<p>setGridWidth : function(nwidth, shrink) {</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>return this.each(function(){</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>if (!this.grid ) {return;} <strong>// doesn&#39;t pass here</strong></p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>var $t = this, cw,</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;> </span>// etc&#8230;</p>
</div>
<p>Help appreciated! Thanks!</p>
]]></description>
        	        	<pubDate>Wed, 22 Feb 2012 23:34:19 +0200</pubDate>
        </item>
</channel>
</rss>