Style cells in a list

Hi guys,

Is it possible to style certain cells in a list?

I have a list where I would like on certain condition to style several columns in a single row with a red(ish) background indicating a problem. Something like the attached screenshot
upload_2017-6-16_11-25-42.png

In this case then cells are colored red if the date in C doesn't match the date in A. Same concept.

Best regards,
Arnor
 
No simple way to do that. We have a 'use as row class' setting on elements, where you can add the value of that element as a class name on the row, but that won't work for your case, of comparing one value against another.

The only "simple" way I could think of would be to add a calc element, which compares the two elements, and returns 'red' (or whatever) if they are different, and set "use as row class" on that.

Then add a custom_php.css on your template which defines the class.

Other than that, you'd have to either do it in JS or a custom template, neither of which are trivial.

-- hugh
 
Hi Hugh,

Thanks! The "use as row class" applies to the entire row and is applied to the <tr>, doesn't it? We were hoping that we could apply it only to part of the list, but if we have to use the entire row, we can do that :)

Best regards,
Arnor
 
You can use it for single cells only by additionally using the cell class (= full element name), somthing like
tr.red td.your-element {background:some-color;}

BTW:
Why are you posting in the community formum if you have standard subscription?
Threads in community forum are less monitored.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top