<?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: Problem with column with after load grid_cookie</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/problem-with-column-with-after-load-grid_cookie</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/problem-with-column-with-after-load-grid_cookie/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>josecoronel on Problem with column with after load grid_cookie</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/problem-with-column-with-after-load-grid_cookie#p25952</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/problem-with-column-with-after-load-grid_cookie#p25952</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Recently I upgrade to jGrid 4.3.1. After that, the setColProp with option WIDTH stopped workingand the columns do not change their size.</p>
<p>Here is my code:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8797' value='Select Code' data-codeid='sfcode8797' /></p>
<div class='sfcode' id='sfcode8797'>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>&#8230;</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>var columnNameWidth = getGridCookie(name+&#34;colwidth&#34;).split(&#34;-&#34;);&#160;</p>
<p>// columnNameWidth =&#160;[&#34;rn.25&#34;, &#34;veh_id.452&#34;, &#34;veh_nombre.110&#34;, 18 m&#225;s...]</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>for( k = 0; k &#60; columnNameWidth.length; k++ ) {</p>
<p><span style=&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span> </span>var columnNW = columnNameWidth[k].split(&#34;.&#34;);</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>&#160;// columnNW = [&#34;veh_id&#34;, &#34;452&#34;]</p>
<p><span style=&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;> <span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span> </span>tableDivObject.jqGrid(&#39;setColProp&#39;, columnNW[0], {width:columnNW[1]});</p>
<p><span style=&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span> </span>// &#160;	 &#160;tableDivObject.setColProp(columnNW[0], {width:columnNW[1]});&#160;</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>}<span style=&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;> </span></p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>var totalwidth = tableDivObject.jqGrid(&#39;getGridParam&#39;,&#39;width&#39;);</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>tableDivObject.jqGrid(&#39;setGridWidth&#39;, totalwidth);&#160;</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>var grid_param &#160;= tableDivObject.jqGrid(&#39;getGridParam&#39;);</p>
<p><span style=&#34;&#34;&#34;white-space:&#34;&#34;> </span>&#8230;</p>
</div>
<p>The grid_param shows the width correctly but the changes aren&#39;t reflected in the grid.</p>
<p>I found this comment in the jqgrid source of setColProp. This is real ? the width property didn&#39;t work ?</p>
</p>
<div id="sb25-L3466" class="sourceRow ">
<p><input type='button' class='sfcodeselect' name='sfselectit4704' value='Select Code' data-codeid='sfcode4704' /></p>
<div class='sfcode' id='sfcode4704'>
<div id=&#34;&#34;sb25-L3466&#34;&#34; class=&#34;&#34;sourceRow&#34;>setColProp : function(colname, obj){</div>
<div id="sb25-L3467" class="sourceRow "><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>//do not set width will not work</div>
<div id="sb25-L3468" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>return this.each(function(){</div>
<div id="sb25-L3469" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>if ( this.grid ) {</div>
<div id="sb25-L3470" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>if ( obj ) {</div>
<div id="sb25-L3471" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>var cM = this.p.colModel;</div>
<div id="sb25-L3472" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>for ( var i =0;i&#60;cM.length;i++ ) {</div>
<div id="sb25-L3473" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>if ( cM[i].name == colname ) {</div>
<div id="sb25-L3474" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>$.extend(this.p.colModel[i],obj);</div>
<div id="sb25-L3475" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>break;</div>
<div id="sb25-L3476" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>}</div>
<div id="sb25-L3477" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>}</div>
<div id="sb25-L3478" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>}</div>
<div id="sb25-L3479" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>}</div>
<div id="sb25-L3480" class="sourceRow"><span style="white-space: pre;"><span style="white-space: pre;"> </span> </span>});</div>
<div id="sb25-L3481" class="sourceRow">},&#160;</div>
</div>
</div>
<p>Looking forward for your reply !</p>
<p>Thanks Jose</p>
]]></description>
        	        	<pubDate>Wed, 15 Feb 2012 17:48:14 +0200</pubDate>
        </item>
</channel>
</rss>