<?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: per column css classes (colgroups?)</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups</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/per-column-css-classes-colgroups/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on per column css classes (colgroups?)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9434</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9434</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Just to know - I have try to add this feature, but as usuall all IE browsers make me not happy.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 08 Sep 2009 07:43:19 +0300</pubDate>
        </item>
        <item>
        	<title>pbor on per column css classes (colgroups?)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9360</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9360</guid>
        	        	<description><![CDATA[<p>Hi, thanks for the reply.</p>
</p>
<p>I admit I am no cross-browser expert, but colgroup seemed to work ok for just setting the style without fancy stuff like spanning multiple columns etc.</p>
</p>
<p>That said I am not particularly attached to colgroups, what I really need is the ability to set style for specific columns, and in particular for the first and the last. Would you consider adding that, even in a different way like setting the class on every cell?</p>
]]></description>
        	        	<pubDate>Fri, 04 Sep 2009 10:31:19 +0300</pubDate>
        </item>
        <item>
        	<title>tony on per column css classes (colgroups?)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9343</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9343</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for this.</p>
<p>To be a honest setting colgroup is a little bit difficult. The problem is not that I can not do this. The problem is that colgroup have diffrent behaviours on diffrent browsers (espacially in FireFox, Safari and Chrome).</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 04 Sep 2009 06:00:43 +0300</pubDate>
        </item>
        <item>
        	<title>pbor on per column css classes (colgroups?)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9179</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9179</guid>
        	        	<description><![CDATA[<p>Sorry, I am not very used to forums, so I made some errors in the above post and I ended up cut and pasting the wrong version of the patch instead of the one of the version I am testing... some notes:</p>
<p>1) in the patch var cgc = ts.p.colModel[i].name should be ts.p.colModel[i].colclass</p>
<p>2) I added a ui-column class to each column... this was more of a test, not sure it is useful</p>
<p>3) It is probably good to always add special css classes to the first and last column, since they are useful to customize css borders</p></p>
]]></description>
        	        	<pubDate>Tue, 01 Sep 2009 08:37:26 +0300</pubDate>
        </item>
        <item>
        	<title>pbor on per column css classes (colgroups?)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9178</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/per-column-css-classes-colgroups#p9178</guid>
        	        	<description><![CDATA[<p>Hi, I&#39;d like to have some per-column css classes to customize the look of some columns (in particular the first and last column, but there are also other usecases)</p>
</p>
<p>Would it be possible to make jqgrid emit &#60;colgroup&#62; tags and let the user specify css classes on it?</p>
</p>
<p>I gave it a try and came up with something like this patch, but I am not sure if it is the best way to do it...</p>
</p>
<p>diff --git a/js/grid.base.js b/js/grid.base.js<br />index 5074e7c..95ed716 100644<br />--- a/js/grid.base.js<br />+++ b/js/grid.base.js<br />@@ -1036,6 +1036,11 @@ $.fn.jqGrid = function( p ) {<br /> if(ts.p.scroll===true){<br /> ts.p.pgbuttons = false; ts.p.pginput=false; ts.p.rowList=[];<br /> }<br />+		for(i=0;i&#60;this.p.colNames.length;i++){<br />+			var cgc = ts.p.colModel[i].name;<br />+			var colgrp = "&#60;colgroup span=&#39;1&#39; class=&#39;ui-column "+cgc+"&#39;/&#62;";</p>
<p>+			$(this).append(colgrp);<br />+		}<br /> var thead = "&#60;thead&#62;&#60;tr class=&#39;ui-jqgrid-labels&#39; role=&#39;rowheader&#39;&#62;",<br /> tdc, idn, w, res, sort,<br /> td, ptr, tbody, imgs,iac="",idc="";</p>
</p>
<p>then you can specify the colclass css class in the colmodel:</p>
<p>&#160;&#160;&#160; colModel:[ <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;,xmlmap:"id",colclass:"first",resizable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;owner&#39;,index:&#39;owner&#39;,xmlmap:"owner",resizable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;status&#39;,index:&#39;status&#39;,xmlmap:"status",resizable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;name&#39;, index:&#39;name&#39;,xmlmap:"name",colclass:"last",resizable:false}<br />&#160;&#160;&#160; ],</p></p>
]]></description>
        	        	<pubDate>Tue, 01 Sep 2009 08:23:17 +0300</pubDate>
        </item>
</channel>
</rss>