hello Thiago,

thanks very much, it works great, smooth and accurate. :-)

regards,
wesley


Thiago HP wrote:
> 
> On Tue, Jan 20, 2009 at 1:29 AM, wesleywj2 <wesley...@yahoo.co.uk> wrote:
> 
>> hi there,
> 
> Hi!
> 
>> i 've wondered how to change the background color of the <tr> element
>> based
>> on data?
>> normally we just override the css, but on my case, when my data is
>> populated; one of my column is a fixed string. based on this column value
>> i
>> will have a unique background color for it. so how do it i do it with
>> T5's
>> grid?
> 
> Use the rowClass parameter. Something like:
> 
> <table t:type="Grid" t:rowClass="rowClass" t:row="object" ...../>
> 
> public String getRowClass() {
>     if (object.getTag().equals("DP")) {
>         return "redBackground";
>     }
>     else {
>         return "";
>     }
> }
> 
> In your CSS:
> 
> tr.redBackground {
>     background-color: red;
> }
> 
> -- 
> Thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/change-grid-table-row-background-color-based-on-column-data-tp21556401p21575926.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to