Scriptcase Change Grid Row/Record Color

Is there a way to change the entire background color of a row/column. For example, when the record has a status of ‘active’ I want the entire row to be light green and when its ‘closed’ I want the entire record to be light red. I know you can do this with the sc_field_style macro for indivudal fields but not whole rows. Any help would be appreciated thanks!

Hi
as far as I know, you have to change each field, hard task if you have many fields

It would be a great improvement !

1 Like

There is a post on brazilian forum where in post #6 there is an interesting idea about how to do this, instead of sc_field_style macro.

Hope this helps.`

1 Like

the TR elements have id SC_ancor1 2 3 4 and this the row number displayed.
So if in a fiedd text, you can enable execution of javascript and add this code in the OnRecord

if ( iwantit ) {
    {atextfileddisplayed} .= "<script>$(\"#SC_ancor" . $this->SC_seq_page . "\").css('background-color', 'red');</script>";
}

The $this->SC_seq_page is undocumented, so if after ad update it stops to work, do not blame me :smiley:

1 Like