<?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: Set color of entire column?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/set-color-of-entire-column</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/set-color-of-entire-column/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>alohaaaron on Set color of entire column?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-color-of-entire-column#p20914</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-color-of-entire-column#p20914</guid>
        	        	<description><![CDATA[<p>Hi, I&#39;m trying to set the color&#160;of the values in&#160;my Date column to red but only find syntax to set a single cell not the entire column.&#160; Would I get the total rows displayed in the grid and then loop through them and set the color of the rowid one by one?</p>
<p>for (i = 0; i++; i &#60; totalrowsingrid&#160;) {</p>
<p>$("#mygrid").jqGrid("setCell",rowid,"Date","",{&#39;font-weight&#39;: &#39;bold&#39;,color: &#39;red&#39;,&#39;text-align&#39;:&#39;center&#39;});</p>
<p>}</p>
<p>CORRECTION: even if I replace rowid with an actual row number in the example aboverit doesn&#39;t set the cell color.</p>
<p>This syntax works to change a single cell color but not the entire column</p>
<p>&#160;$("#mygrid tr:nth-child(3) td:nth-child(2)").css("color", "red");</p>
</p>
<p>I&#39;ve also tried to set this in the colmodel like this and it didn&#39;t show any changes.&#160; I am using the custom theme redmond and have heard that it can prevent grid styles from being displayed?</p>
<p>&#60;style&#62;</p>
<p>.test {<br />&#160;color: &#39;#FF0000&#39;;</p>
<p>}</p>
<p>&#60;/style&#62;</p>
<p>colModel :[</p>
<p>{name:&#39;Date&#39;, index:&#39;Date&#39;, width:70, align:&#39;left&#39;,classes: &#39;test&#39;}</p>
<p>]</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Fri, 19 Nov 2010 20:42:03 +0200</pubDate>
        </item>
</channel>
</rss>