Field color in a grid

Can somebody help me…

I want to change the background color in a record in a grid. I use therefore in the event “OnRecord”:

$alarmx = {alarm};
if ($alarmx == 1){
sc_field_style({alarm_kleur},’#FF0000’);
}

Also using only:
sc_field_style({alarm_kleur},’#FF0000’);

no result.

The variable $alarm is an integer which has been set by a script.
Problem is that the fieldcolor in the grid does not change. I tried everything but nor result.

What to do?

Regards, Bert

I have just put…

sc_field_style({my_field_name},’#FF0000’);

…into the OnRecord event of a grid and its working ok. Changed the field/column to black on red!!

I’m using v8.00.0031.

Is {alarm} showing on the grid? Can you check if its value is in fact 1?

Ok Garfieldus,

I managed. The reason is (as far as I can see) that the field in the database may not be “Null”
I put an empty string in it and yes it works. I did not expect this.
Thanks for your answer. Bert

PS:
Who is going to help me to write a manual with all the scriptcase tips and tricks?

I have a faq section on scriptcase.eu. I don’t mind if you write into that Bert. Also I’m willing to work on it.

@ Albert
Yes I will.
There is also a need on my side to organize a sort of “sc usergroup NL”
It could save me time and to get ideas. We could do it virtualy (teamviewer or other tool) and one’s a year meeting together.

Regards Bert

Yes we should, I simply have had a rough year, lots happening and too little time to develop. I will get back to you.