Grid private messages between members.

Grid private messages between members.

Hi, I am making a private messaging system between members, with a grid where the user opens the message list.
How can I create an effect where the unread messages are in RED or codraddistinti a visualization that makes understand immediately that the private message has not been read?

peraziende,

You can do it like this in the grid’s onRecord event:



$test = ({msg_read} == 0);    // Or however you need to test read/unread status
$red = '#FF0000';
$black = '#000000';

if ($test) {
      sc_field_color("Subject", $red);
}
else {
      sc_field_color("Subject", $black);
}


Of course, replace “Subject” with the name of the grid’s field that you want to colorize.

Hope this helps,

Dave