<?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: jqGrid in UI tabs</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs</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/jqgrid-in-ui-tabs/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dpugh on jqGrid in UI tabs</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22694</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22694</guid>
        	        	<description><![CDATA[<p>Great minds think alike <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
]]></description>
        	        	<pubDate>Wed, 06 Apr 2011 20:54:37 +0300</pubDate>
        </item>
        <item>
        	<title>ronchalant on jqGrid in UI tabs</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22675</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22675</guid>
        	        	<description><![CDATA[<p>Yeah that&#39;s basically what I did ... within my jqGrid wrapper class:</p>
</p>
<p>&#160;&#160;&#160; var created = false;<br />&#160;&#160; &#160;var create = function() {<br />&#160;&#160; &#160;&#160;&#160; &#160;if (created === true)<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return;</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160; created = true;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#mygrid&#39;).jqGrid(cfg);<br />&#160;&#160;&#160; };</p>
<p>&#160;&#160;&#160; if (!$(&#39;#mygrid&#39;).is(&#39;:hidden&#39;)) {<br />&#160;&#160; &#160;&#160; // good to go.<br />&#160;&#160; &#160;&#160; create();<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; else {<br />&#160;&#160; &#160;&#160; var tabHandler = function(event, ui) {<br />&#160;&#160; &#160; &#160;&#160; if (!$(&#39;#mygrid&#39;).is(&#39;:hidden&#39;)) {<br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; // good to go.<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; create();<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; $(&#39;#tabs&#39;).unbind("tabsshow", tabHandler);<br />&#160;&#160; &#160;&#160;&#160;&#160; }<br />&#160;&#160; &#160;&#160; };<br />&#160;&#160; &#160;&#160; $(&#39;#tabs&#39;).bind("tabsshow", tabHandler);<br />&#160;&#160;&#160; }</p>
</p>
<p>(the above assumes &#39;#tabs&#39; is the tab block and the &#39;#mygrid&#39; is where the grid will be rendered)</p>
]]></description>
        	        	<pubDate>Tue, 05 Apr 2011 17:19:19 +0300</pubDate>
        </item>
        <item>
        	<title>dpugh on jqGrid in UI tabs</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22674</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22674</guid>
        	        	<description><![CDATA[<p>An alternative is to load the grid only when the tab is clicked i.e.</p>
<p>$(document).ready(function(){</p>
<p><span style="white-space: pre;"> </span>$(&#39;#tabs&#39;).tabs({</p>
<p><span style="white-space: pre;"> </span>"select":function(event,ui){</p>
<p><span style="white-space: pre;"> </span>switch(ui.index){</p>
<p><span style="white-space: pre;"> </span>case 0:</p>
<p><span style="white-space: pre;"> </span>loadGrid();</p>
<p><span style="white-space: pre;"> </span>break;</p>
<p><span style="white-space: pre;"> </span>........</p>
<p><span style="white-space: pre;"> </span>}</p>
<p><span style="white-space: pre;"> </span>}</p>
<p><span style="white-space: pre;"> </span>});</p>
<p>});</p>
<p>.</p>
<p>var grid_isloaded=false;</p>
<p>function loadGrid(){</p>
<p><span style="white-space: pre;"> </span>if(!grid_isloaded){</p>
<p><span style="white-space: pre;"> </span>$(&#39;#...&#39;).jqGrid({.....});</p>
<p><span style="white-space: pre;"> </span>grid_isloaded=true;</p>
<p><span style="white-space: pre;"> </span>}else</p>
<p><span style="white-space: pre;"> </span>$(&#39;#...).trigger("reloadGrid");</p>
<p>};</p>
</p>
<p>This is what I do &#160;and has the advantage that it is not getting the data until the tab is clicked, improving page load time.</p>
</p>
<p>Dave</p>
]]></description>
        	        	<pubDate>Tue, 05 Apr 2011 17:05:38 +0300</pubDate>
        </item>
        <item>
        	<title>ronchalant on jqGrid in UI tabs</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22649</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-in-ui-tabs#p22649</guid>
        	        	<description><![CDATA[<p>I&#39;ve tried to do a search for similar topics, but I didn&#39;t come up with anything (most of the results were about hiding/showing columns)</p>
<p>I&#39;m trying to embed multiple jqGrids in jquery-ui tab structure, the problem being that the width:&#39;auto&#39; setting seems to fail for those that are in the hidden tabs - so when I move to a tab that&#39;s initially not selected with a rendered jqGrid within it the grid is tiny.</p>
<p>I believe this is because jquery apparently cannot get the width of a containing element when it&#39;s hidden (I know it has trouble getting the position/etc.).&#160;</p>
<p>Has anybody had experience rendering a jqGrid that is within an initially hidden element? Outside of deferring the jqGrid initialization until after the tab is clicked, is there a way to get this to work correctly? &#160;</p>
<p>Alternatively I could try and auto-width it myself by crawling up the parent() tree until I find a is(":visible") element and calculating what the container size WILL be, but that seems like a bit of a hack.</p>
]]></description>
        	        	<pubDate>Fri, 01 Apr 2011 16:21:08 +0300</pubDate>
        </item>
</channel>
</rss>