Coloring an entire coumn

75 views
Skip to first unread message

Ari Sobel

unread,
May 25, 2023, 7:27:26 AM5/25/23
to Jam.py Users Mailing List
Hi to all,

I figured out how to give color to a cell content (with the on_field_get_html). But how should I add color to an entire column?

image.png

Dean D. Babic

unread,
May 26, 2023, 2:09:17 AM5/26/23
to Jam.py Users Mailing List
Hi Ari,

I would just keep to conditional coloring, like in here (Export is there).:

For sure you could color all values in a column in similar way. 

D.

Ari Sobel

unread,
May 28, 2023, 9:25:40 AM5/28/23
to Dean D. Babic, Jam.py Users Mailing List
Hi Babic,

My intention was not the content or the text color. My question is about the entire column background.

Thanks in advance.
Ari

--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jam-py/b425515e-f364-4dfb-90ca-b6c459cafa4fn%40googlegroups.com.

Dean D. Babic

unread,
May 28, 2023, 9:38:50 PM5/28/23
to Jam.py Users Mailing List
Hi Ari, 
Babić is my surname :)
Like Luka Modrić - if you followed Croatia-Brasil WC 2022 :) Other than that I do not know unfortunately. 

Dean D. Babic

Ari Sobel

unread,
May 29, 2023, 7:32:49 AM5/29/23
to Dean D. Babic, Jam.py Users Mailing List
Well noted, Dean.

My question is if is there a way to use de "on_view_form_created" and put the background-color form some column.

Best regards,
Ari


Danijel Kaurin

unread,
May 29, 2023, 1:03:19 PM5/29/23
to Jam.py Users Mailing List
Hi Ari,

To achive this:

Capture.PNG

add this css code project.css in task tree:

.view-form.invoices .tax {
    background-color: red;
    color: white;
}

Regards

Danijel Kaurin

Danijel Kaurin

unread,
May 29, 2023, 1:11:38 PM5/29/23
to Jam.py Users Mailing List
Also, to achive this:

Capture_1.PNG

add this code to Client module:

function on_field_get_html(field) {
    if (field.field_name === 'tax') {
        return '<span style="background-color: red; color: white;">' + field.display_text + '</span>';
    }
}

Ari Sobel

unread,
May 31, 2023, 5:11:18 PM5/31/23
to Danijel Kaurin, Jam.py Users Mailing List
thank you Daniel.

Reply all
Reply to author
Forward
0 new messages