<?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: Cell and Header auto sizing?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing</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/cell-and-header-auto-sizing/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>kspeakman on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4575</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4575</guid>
        	        	<description><![CDATA[<p>I experimented with using table-layout: auto, but the way the HTML is designed, the header and pager can&#39;t be resized with the grid. As Tony said, there is also a lot of CSS and inline style that are meant for fixed-width columns that you have to combat to try auto sizing.</p>
<p>It&#39;s going to take an HTML/CSS redesign to be able to do either auto or fixed. As far as HTML, the main point would be to wrap the header, grid, and pager in a table element. That would make the header and pager automatically size up to the grid size (since it&#39;s a div element), provided the width styling is left off those elements. Tables are annoying to work with, but are still the most straightforward way to do that.</p>
<p>The auto-sized grid could disable the drag handles and resizing in the first iteration. However, there could be a case for doing resizing on an auto-sized table. This could be accomplished by using the .offsetHeight and .offsetWidth javascript properties. These properties apparently <a href="http://www.quirksmode.org/dom/w3c_cssom.html#elementview" target="_blank">work</a> in all modern browsers. I tested them to work on at least DIV and TD elements in Chrome, Firefox 3, and IE 7.</p>
<p>I think there is some combination of HTML that could be used both ways, for auto and fixed sizing. The fixed sizing should just require extra CSS.</p>
]]></description>
        	        	<pubDate>Wed, 11 Feb 2009 10:35:10 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4557</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4557</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I&#39;m not sure that this can be implemented easy. This is due the concept of jqGrid. Basically jqGrid uses the CSS property table-layout : fixed. There is another layout - table-layout: auto which do what you ask. Moreover when we have this, resizing columns will be a very hard job.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 10 Feb 2009 23:36:26 +0200</pubDate>
        </item>
        <item>
        	<title>maggie on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4536</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4536</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I am also very interested in the cell auto size feature. I have a "comments" column with lots of contents. It will be great if the&#160;cell can be sized based on it&#39;s contents like that of html table cell.&#160;Any plans to support this soon?</p>
<p>Thanks! Maggie</p>
]]></description>
        	        	<pubDate>Mon, 09 Feb 2009 11:19:30 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4248</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4248</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Every help is welcome.</p>
<p>Thank you</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 30 Jan 2009 09:27:22 +0200</pubDate>
        </item>
        <item>
        	<title>kspeakman on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4223</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4223</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony said:</p>
<p>Hello,</p>
<p>Currently this is not possible.</p>
<p>Regards</p>
<p>Tony</p>
</blockquote>
<hr />
<p>Hi,</p>
<p>Thanks for the response.</p>
<p>Any plans to support this? If you are&#160;the least bit&#160;interested in doing this, I can work on some HTML/CSS that works both ways &#8212; static and auto sizing. (After I finish my project.)</p>
<p>Any help on the drag handle issue? Resizing is nice, but for my project I don&#39;t need resizing as much as I don&#39;t need each column header to take up an extra 8 or 10 pixels.</p>
<p>And by the way, thanks for creating jqGrid.</p>
<p>Kasey</p>
]]></description>
        	        	<pubDate>Thu, 29 Jan 2009 07:41:36 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4213</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4213</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Currently this is not possible.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 29 Jan 2009 06:24:19 +0200</pubDate>
        </item>
        <item>
        	<title>kspeakman on Cell and Header auto sizing?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4200</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-and-header-auto-sizing#p4200</guid>
        	        	<description><![CDATA[</p>
<p>Hello,</p>
<p>I&#39;m looking for a way to make the jqGrid be sized based on it&#39;s contents&#160;(the default behavior of an HTML table)&#160;rather than have to pre-set a size (or pre-set column widths). Is this possible with jqGrid?</p>
<p>I&#39;ve tried using jQuery to set the table-layout to auto and set the width of sub-elements to auto as follows:</p>
<p>$("#gridContainer [style*=&#39;width:&#39;]").width("auto");<br />$("#gridContainer table").css("table-layout", "auto");</p>
<p>(gridContainer is a div that&#39;s a parent of the jqGrid)</p>
<p>But this has not produced the desired results.</p>
<p>Also, I notice the drag handle takes up space and is capable of clipping the header text and the sort image even if column resizing is turned off on all columns. I would very much like to prevent that, too.</p>
<p>Any suggestions would be appreciated. Thanks,</p>
<p>Kasey</p>
]]></description>
        	        	<pubDate>Wed, 28 Jan 2009 17:02:33 +0200</pubDate>
        </item>
</channel>
</rss>