<?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: $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event</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/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>putnik on $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27971</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27971</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Sorry for the delay.</p>
<p>Thank you for the solution very much.</p>
<p>It works perfectly.</p>
</p>
<p>For my soultion I&#39;ve just overrided the&#160;cellWidth() function to return true. It also works without any changes in the jqGrid code.</p>
</p>
<p>Kind Regards,</p>
<p>Andrew Zhuk</p>
]]></description>
        	        	<pubDate>Thu, 03 Jan 2013 09:49:29 +0200</pubDate>
        </item>
        <item>
        	<title>tony on $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27914</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27914</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I have fixed the problem in <a href="https://github.com/tonytomov/jqGrid/commit/44b4e7190e63faecc2fa1a492cf5980fc0e83f11" target="_blank">GitHub</a>.</p>
<p>Could you please let me know if this ok for you?</p>
<p>Thanks.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 13 Dec 2012 10:31:27 +0200</pubDate>
        </item>
        <item>
        	<title>putnik on $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27913</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27913</guid>
        	        	<description><![CDATA[<p>Hello tony,</p>
</p>
<p>Thank you for your suggestion but it does not fix that problem. Function <strong>setGridWidth </strong>forces window to rise &#39;<strong>resize</strong>&#39; event (IE8) in any case: use timeout or not.</p>
<p>The main problem is the implementation of the&#160;<strong>$.jgrid.cellWidth()</strong> function that is invoked inside the <strong>setGridWidth</strong>.</p>
<p>Here is the simple code to reproduce it:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8518' value='Select Code' data-codeid='sfcode8518' /></p>
<div class='sfcode' id='sfcode8518'>
<p>&#60;!DOCTYPE html&#62;</p>
<p>&#60;html&#62;</p>
<p>&#60;head&#62;</p>
<p>&#60;title&#62;&#60;/title&#62;</p>
<p>&#60;script src=&#34;Script/jquery-1.8.0.js&#34;&#62;&#60;/script&#62;</p>
<p>&#60;script src=&#34;Script/jquery.jqGrid.src.js&#34;&#62;&#60;/script&#62;</p>
<p>&#60;script type=&#34;text/javascript&#34; language=&#34;JavaScript&#34;&#62;</p>
<p>var count = 1;</p>
<p>$(function(){</p>
<p style=&#34;padding-left: 30px;&#34;>initGrid();</p>
<p style=&#34;padding-left: 30px;&#34;>$(window).bind(&#39;resize&#39;, function() {</p>
<p style=&#34;padding-left: 60px;&#34;>setTimeout(function() {</p>
<p style=&#34;padding-left: 60px;&#34;>$(&#39;#grid&#39;).setGridWidth(1000);</p>
<p style=&#34;padding-left: 60px;&#34;>&#160;</p>
<p style=&#34;padding-left: 60px;&#34;>$(&#39;body&#39;).append(count++);</p>
<p style=&#34;padding-left: 60px;&#34;>}, 100);</p>
<p style=&#34;padding-left: 30px;&#34;>});</p>
<p>});</p>
</p>
<p>function initGrid() {</p>
<p style=&#34;padding-left: 30px;&#34;>var options = {};</p>
<p style=&#34;padding-left: 30px;&#34;>$(&#39;#grid&#39;).jqGrid(options);</p>
<p>};</p>
<p>&#60;/script&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p style=&#34;padding-left: 30px;&#34;>&#60;div&#62;</p>
<p style=&#34;padding-left: 60px;&#34;>&#60;table id=&#34;grid&#34;&#62;&#60;/table&#62;</p>
<p style=&#34;padding-left: 30px;&#34;>&#60;/div&#62;</p>
<p>&#60;/body&#62;</p>
<p>&#60;/html&#62;</p>
</div>
<p>In my project I&#39;ve just overrided the <strong>$.jgrid.cellWidth()</strong>&#160;function to return true. But I suppose it&#39;s not good solution.</p>
</p>
<p>Regards.</p></p>
]]></description>
        	        	<pubDate>Thu, 13 Dec 2012 09:16:55 +0200</pubDate>
        </item>
        <item>
        	<title>tony on $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27909</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27909</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Use setTimeout when you call the setGridwidth.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6591' value='Select Code' data-codeid='sfcode6591' /></p>
<div class='sfcode' id='sfcode6591'>
<p>$(window).bind(&#39;resize&#39;, function () {</p>
<p>&#160;&#160;&#160; setTimeout(function(){ $(&#34;#grid&#34;).jqGrid(&#39;setGridWidth&#39;, 1000);},100);</p>
<p>});</p>
</p>
</div>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 12 Dec 2012 18:36:40 +0200</pubDate>
        </item>
        <item>
        	<title>putnik on $.jgrid.cellWidth() function forces IE8 to throw window.resize event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27907</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jgrid-cellwidth-function-forces-ie8-to-throw-window-resize-event#p27907</guid>
        	        	<description><![CDATA[<p>Hello everyone,</p>
</p>
<p>I need to resize jqGrid when user resizes a browser. So, I used the following code:</p>
<p>$(window).bind(&#39;resize&#39;, function () {</p>
<p><span style="white-space: pre;"> </span>$("#grid").jqGrid(&#39;setGridWidth&#39;, 1000);</p>
<p>});</p>
<p>I notified that in IE8 that construction goes to infinite cycle. I&#39;ve investigated it and found that setGridWidth calls $.jgrid.cellWidth() inside.</p>
<p>$.jgrid.cellWidth() contains following code:</p>
<p>var $testDiv = $("&#60;div class=&#39;ui-jqgrid&#39; style=&#39;left:10000px&#39;&#62;&#60;table class=&#39;ui-jqgrid-btable&#39; style=&#39;width:5px;&#39;&#62;&#60;tr class=&#39;jqgrow&#39;&#62;&#60;td style=&#39;width:5px;&#39;&#62;&#60;/td&#62;&#60;/tr&#62;&#60;/table&#62;&#60;/div&#62;"),</p>
<p>testCell = $testDiv.appendTo("body").find("td").width();</p>
<p>$testDiv.remove();</p>
<p>return testCell !== 5;</p>
</p>
<p>Exactly that code forces window to rise resize event in IE8.</p>
</p>
<p>I would really appreciate to any suggestions how to fix this problem or how to resize jqGrid when user resizes the browser.</p>
<p>Thank in advance.</p>
]]></description>
        	        	<pubDate>Wed, 12 Dec 2012 17:29:45 +0200</pubDate>
        </item>
</channel>
</rss>