Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Color list Items according to DB value

That worked for the background color. I tried to change the font color of a lable called "header" inside the grid. The label already has a class "MsgTitle" (sepcified in properties panel). So I updated my code in mapping to the following:

preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(".MsgTitle").css("color", "red");
}
/pre

However, this did not work. Is the way I specify the class css here wrong?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Color list Items according to DB value

Hello Hawk,

Could you please try the same as for grid:
pre$(".MsgTitle").addClass('highlighted-red');/pre
and in the css for this class according style with the mark
pre!important: background-color: red !important;/pre

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Color list Items according to DB value

Hi Evgene,

Unfortunately it did not work.

This is my CSS:

pretable.highlighted-red tbody tr td div.cell-wrapper {
background-color: #00674e !important;
color: #ffffff !important;
}/pre

And this is mapped to mobileitemlist_272:

preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(".MsgTitle").addClass('highlighted-red');
}/pre

and I tried the following as well
preif(value.MSG_status === 'Unread') {
$(element).find('[name="mobilegrid_284_325"]').addClass('highlighted-red');
$(element).find('[name="MsgTitle"]').addClass('highlighted-red');
}/pre

The font color of the lable "MsgTitle" remained green

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Color list Items according to DB value

Hawk,

And where do you have a css style under the label with added class?
pre.MsgTitle.highlighted-red {
color: red !important;
}/pre

Return to “Issues”