<?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: fitToScreen()</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen</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/feature-request/fittoscreen/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>linoj on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12851</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12851</guid>
        	        	<description><![CDATA[<p>ok, i&#39;ve found several threads and tried a few different things but could use a real example to get this working. Assuming 3.6+. I want to bind the resize to the browser window resize event, and have the grid width adjust to fit its container. Shouldn&#39;t this work?</p>
<p>&#160;&#160;&#160; $(window).bind(&#39;resize&#39;, function() {<br />&#160;&#160;&#160;&#160;&#160; $(&#8221;#my_grid&#8221;).jqGrid(&#39;gridResize&#39;);<br />&#160;&#160;&#160; });</p>
<p>btw, this does work (from <a href="http://www.trirand.com/blog/?page_id=393/feature-request/Resizable%20grid/" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/?p" rel="nofollow">http://www.trirand.com/blog/?p</a>.....le%20grid/</a> )</p>
<p>&#160;&#160;&#160; $(window).bind(&#39;resize&#39;, function() {<br />&#160;&#160;&#160;&#160;&#160; if (grid = $(&#39;.ui-jqgrid-btable:visible&#39;)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; grid.each(function(index) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridId = $(this).attr(&#39;id&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridParentWidth = $(&#39;#gbox_&#39; + gridId).parent().width();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#&#39; + gridId).setGridWidth(gridParentWidth);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160; };<br />&#160;&#160;&#160; });</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 22:21:15 +0200</pubDate>
        </item>
        <item>
        	<title>linoj on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12850</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12850</guid>
        	        	<description><![CDATA[<p>question deleted</p>
<p>[nevermind, i didnt scroll down this topic all the way]</p>
]]></description>
        	        	<pubDate>Tue, 08 Dec 2009 21:23:29 +0200</pubDate>
        </item>
        <item>
        	<title>jhsu on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12655</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12655</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>What I meant by not working on IE is because of the strange behaviour of the resize event from IE. It gets triggered several times when the browser window is being resized by the user, so the width of the grid does not get set to a desired value, and it is difficult and error prone to control it.</p>
<p>I did a html profiling from FireBug, and found out that there are a number of div elements in the grid whose width styles are being set at runtime. If i take out the width style, the grid would resize itself to the width of its container. However, this would also break the alignment of the column headers with the data columns in the rows.</p>
<p>What I am proposing is to have the grid support the setting of the width to &#39;100%&#39;&#160; or not set at all, and under these conditions, the grid would not statically set the width of the div elements, and this should make it resize properly to its container element. The grid, of course, would need to take care of any column header alignment issues with the rest of the grid.</p>
</p>
<p>Thanks again.</p>
]]></description>
        	        	<pubDate>Wed, 02 Dec 2009 15:39:58 +0200</pubDate>
        </item>
        <item>
        	<title>tony on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12627</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12627</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>What you mean with "none of them work with IE" ?</p>
<p>What is happen?</p>
<p>For IE you maybe you will need not to use innerWidth instead of width</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 02 Dec 2009 09:09:23 +0200</pubDate>
        </item>
        <item>
        	<title>jhsu on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12615</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p12615</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I&#39;ve been trying to get jqGrid to resize dynamically with the width of it&#39;s container using various methodologies including one detailed above. Unfortunately, none of them work with IE (v6, v7 and v8) properly.</p>
<p>Could I suggest for the next version to add support to set the width option to &#39;100%&#39; and the grid would resize to fit to the width of its container element (i.e. div)?</p>
</p>
<p>Thank you so much for all your support and work.</p>
]]></description>
        	        	<pubDate>Tue, 01 Dec 2009 17:49:37 +0200</pubDate>
        </item>
        <item>
        	<title>jmav on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p10997</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p10997</guid>
        	        	<description><![CDATA[<p><a href="http://www.trirand.com/blog/?page_id=393/feature-request/Resizable%20grid/#p10996" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/?p" rel="nofollow">http://www.trirand.com/blog/?p</a>.....id/#p10996</a></p>
]]></description>
        	        	<pubDate>Thu, 22 Oct 2009 14:55:42 +0300</pubDate>
        </item>
        <item>
        	<title>tony on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5672</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5672</guid>
        	        	<description><![CDATA[<p>Hello Kevin,</p>
<p>$(window).resize(function() {</p>
<p>// get here the width of parent container</p>
<p>var parentwidth = some_value</p>
<p>setTimeout(function(){$("#mygrid").setGridWidth(parentwidth)},300);</p>
<p>});</p>
</p>
<p>In order to resize the grid when you resize other element in the html page you should be able to have e event when you stop to resize the element and do the same approch as above.</p>
</p>
<p>Hope this helps a lot 🙂</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 30 Mar 2009 03:41:35 +0300</pubDate>
        </item>
        <item>
        	<title>RaveKev on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5629</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5629</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>that function i&#39;ve found allready. But when i resize my window, how could i change the width of the grid dynamicly?</p>
<p>I looked into your code to see what i have to change, do enable entering the width in percent..</p>
<p>I think i have never closed a document so fast and frustrated <img class="spSmiley" style="margin:0" title="Laughing" src="/blog/wp-content/plugins/simple-forum/tinymce/plugins/emotions/img/smiley-laughing.gif" border="0" alt="Laughing" /></p>
</p>
<p>Best Regards</p>
<p>Kevin</p></p>
]]></description>
        	        	<pubDate>Thu, 26 Mar 2009 05:46:16 +0200</pubDate>
        </item>
        <item>
        	<title>tony on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5597</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5597</guid>
        	        	<description><![CDATA[<p>Hello Kevin,</p>
<p>We hve two methods setGridWidth and setGridHeight (if I rememeber right) which can do the same.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 25 Mar 2009 11:03:29 +0200</pubDate>
        </item>
        <item>
        	<title>RaveKev on fitToScreen()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5589</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/fittoscreen#p5589</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>what about a function <strong><span style="color: #3366ff;">fitToWindow(width, height) ?</span></strong></p>
<p><span style="color: #000000;">width &#38; height are boolean values. </span></p>
<p><span style="color: #000000;">So <span style="color: #3366ff;"><strong>fitToWindow(true, false) </strong><span style="color: #000000;">will widen the grid to the edges of the current window, but the height is the value, you&#39;ve set with height:&#39;***&#39; in&#160; </span></span></span><span style="color: #3366ff;"><strong>.jGrid(){} </strong></span></p>
<p><span style="color: #000000;"><span style="color: #3366ff;"><strong>fitToWindow(false, true) </strong><span style="color: #000000;">will do it vice versa. (Strech to the complete height of the window, but the width is that width you&#39;ve set with width:&#39;***&#39;.<br /></span></span></span></p>
<p>I think, i don&#39;t have to explain, what <span style="color: #000000;"><span style="color: #3366ff;"><strong>fitToWindow(true, true) </strong></span></span>will do <img class="spSmiley" style="margin:0" title="Tongue out" src="/blog/wp-content/plugins/simple-forum/tinymce/plugins/emotions/img/smiley-tongue-out.gif" border="0" alt="Tongue out" /></p>
</p>
<p>Or if you don&#39;t want to use that <strong><span style="color: #3366ff;">fitToWindow(width, height) </span></strong>function, you don&#39;t have to insert a numeric value in width and height inside <span style="color: #3366ff;"><strong>.jGrid(){}</strong><span style="color: #000000;">, but you can input full where you&#39;ve set for example &#39;auto&#39; until now.</span></span></p>
</p>
<p>Bye,</p>
<p>Kevin</p>
<p>(yes, the last-days-bugging-Kevin <img class="spSmiley" style="margin:0" title="Laughing" src="/blog/wp-content/plugins/simple-forum/tinymce/plugins/emotions/img/smiley-laughing.gif" border="0" alt="Laughing" /> from germany)</p></p>
]]></description>
        	        	<pubDate>Wed, 25 Mar 2009 10:27:20 +0200</pubDate>
        </item>
</channel>
</rss>