I have used your approach, and its working. Thanks for a very simple 
solution.
Now I want to add custom styles to my columns, but it is not allowing me to 
add.
My goal is to adjust the width of the each column differently.
As I am using GWT 2.1 so 'setColumnWidth()' is out of scope. Can you 
suggest some other workaround?


On Saturday, September 10, 2011 12:23:48 PM UTC+5:30, Sudhakar Abraham 
wrote:
>
> Change the default celltable properties  ".cellTableEvenRow 
> ",".cellTableOddRow" of cellTableStyle.css file. Copy and paste 
> CellTableStyle.css  file in your project directory. Use the 
> CellTable.Resources interface and specify the @source of celltable in 
> your celltable class. 
>
> S. Abraham 
> www.DataStoreGwt.com 
>
>   interface TableResources extends CellTable.Resources 
>   { 
>     @Source(value = { CellTable.Style.DEFAULT_CSS, 
> "CellTableStyle.css" }) 
>     CellTable.Style cellTableStyle(); 
>   } 
> CellTable studentTable = new CellTable<Student>(15, 
> GWT.<TableResources> create(TableResources.class)); 
>
> CellTableStyle.css file. 
>
> .cellTableCell { 
>     height: 25px; 
>     padding: 2px 25px; 
> } 
>
> .cellTableHeader { 
>         height: 25px; 
>         border-bottom: 2px solid #60a6bf; 
>     padding: 3px 25px; 
>     text-align: left; 
>     color: blue; 
>     text-shadow: #ddf 1px 1px 0; 
>     overflow: hidden; 
>     cursor:pointer; 
>     background-image: url(bollon.gif); 
>     background-repeat:no-repeat; 
>     background-position:80% 50%; 
>
> } 
>
> .cellTableEvenRow { 
>         background: #fffaf0; 
>         border:solid 1px red; 
> } 
>
> .cellTableEvenRowCell { 
>     border:solid 1px green; 
> } 
>
> .cellTableOddRow { 
>     background: #fff8e8; 
> } 
>
> .cellTableOddRowCell { 
>      border:solid 1px red; 
> } 
>
> On Sep 10, 5:33 am, Tony Kennah <[email protected]> wrote: 
> > Hi 
> > 
> > Could someone help me in setting the background of a CellTable row 
> > please, I've been trying all night to do it and keep failing and it's 
> > driving me mad.  I tried using a call to "setRowStyles()" but that 
> > doesn't seem to be working and I've read that you can't change the 
> > style for a CellTable once  a style has been set - as the default one 
> > is being set. 
> > 
> > Then I tried constructing a CellTable with my own interface 
> > CellTableResources as seen on a post on this exact subject BUT that 
> > gave me error messages about unobfuscated ccs elements....   which my 
> > css not being obfuscated is an obvious error message. 
> > 
> > Now I don't know what to try and I am officially STUCK. 
> > 
> > TonyK

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/GTZZNH_A-VYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to