<?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: Show at least one grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid</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/help/show-at-least-one-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Clement on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12544</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12544</guid>
        	        	<description><![CDATA[<p>Thanks Tony, setTimeout works!</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 22:47:50 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12514</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12514</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Really forgot it, but you will need to use setTimeout to the grids that do not work.</p>
<p>This is connected maybe with this that the hidden element in jQuery has width and height = 0;</p>
<p>Regrads</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 04:48:32 +0200</pubDate>
        </item>
        <item>
        	<title>Clement on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12461</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12461</guid>
        	        	<description><![CDATA[<p>I think so since I do see grid height changes. The only cases where they do not work as expected are described in my first post. It works when you click to hide a grid but not when click to unhide, the unhidden grid height remains at 400 when viewed even though .jqGrid(&#39;getGridParam&#39;, &#39;height&#39;) reports 200.</p>
</p>
<p>gridA event -</p>
<blockquote>
<p>onHeaderClick: function(stat){<br />&#160;&#160;&#160; setGridHeight($("#gridA"), stat, $("#gridB"));</p>
<p>},</p>
</blockquote>
<p>gridB event -</p>
<blockquote>
<p>onHeaderClick: function(stat){<br /> &#160;&#160;&#160; setGridHeight($("#gridB"), stat, $("#gridA"));</p>
<p>},</p>
</blockquote>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 20:40:54 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12442</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12442</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>My thoght was not only this, but how you pass the sourceGrid,&#160; targetGrid - are they passed correct to the function?</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 12:07:08 +0200</pubDate>
        </item>
        <item>
        	<title>Clement on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12437</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12437</guid>
        	        	<description><![CDATA[<p>I did add alerts to check the new height which is supposed to be 200. The alerts show 200 but the physical height still appear as 400. Appreciate clarification if this is not what you refer to.. Thank you!</p>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 11:23:30 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12435</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12435</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Making alerts after if and else&#160; will give you the answer.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 11:12:38 +0200</pubDate>
        </item>
        <item>
        	<title>Clement on Show at least one grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12380</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/show-at-least-one-grid#p12380</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have two grids on a page: gridA and gridB, both height: 200 and visible onload. What I like it to do are:</p>
<p>1) At least one grid must be shown at any time.</p>
<p>2) If one grid is hidden, the height of the other is doubled to cover the space given up.</p>
<p>Steps to reproduce the only problem encountered:</p>
<p>1) Hide gridA -&#62; gridA is hidden, gridB height: 400</p>
<p>2) Hide gridB -&#62; gridB is hidden, gridA height: 400</p>
<p>3) Unhide gridB -&#62; gridA height: 200, gridB height: still 400!</p>
<p>OR</p>
<p>1) Hide gridB -&#62; gridB is hidden, gridA height: 400</p>
<p>2) Hide gridA -&#62; gridA is hidden, gridB height: 400</p>
<p>3) Unhide gridA -&#62; gridB height: 200, gridA height: still 400!</p>
<p>Have I missed anything? The following function is called in onHeaderClick for both grids. sourceGrid is the grid where header is clicked, targetGrid is the other grid.</p>
<blockquote>
<p>&#160;&#160;&#160;&#160;&#160; function setGridHeight(sourceGrid, sourceGridState, targetGrid){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(sourceGridState == &#8220;hidden&#8221;){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sourceGrid.jqGrid(&#39;setGridHeight&#39;, 200); // Not working!<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Grid#1 is hidden, increase height of grid#2 and unhide it if needed.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; targetGrid.jqGrid(&#39;setGridHeight&#39;, 400);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(targetGrid.jqGrid(&#39;getGridParam&#39;, &#39;gridstate&#39;) == &#8220;hidden&#8221;)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; targetGrid.jqGrid(&#39;setGridState&#39;, &#8220;visible&#8221;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Unhide grid#1, reset height of both grids.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sourceGrid.jqGrid(&#39;setGridHeight&#39;, 200); // Not working!<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; targetGrid.jqGrid(&#39;setGridHeight&#39;, 200);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160; }</p>
</blockquote>
<p>Please advise.. Thank you!!</p>
]]></description>
        	        	<pubDate>Mon, 23 Nov 2009 22:59:48 +0200</pubDate>
        </item>
</channel>
</rss>