Conditional Highlight of a row in table

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
I wanted to highlight a row if Organisation Compliance Indicator checkbox is not ticked which is read only . However it is not highlighting the row and also displaying checkbox as empty value when I used script below.  I included screen shots as well.


Could you please advise.


Javascript:
var field = arguments[0], 
value = skuid.utils.decodeHTML(arguments[1]); 

skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value); 

if (field.mode == 'readonly' && value === false) 

    { 

        field.item.element.addClass("Leadtab_highlighted-row");


    }

css

table.nx-skootable-data tbody tr.LeadTab_highlighted-row td {       background-color: #F05423;
}
Photo of Vasu Deva

Vasu Deva

  • 100 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Vasu Deva

Vasu Deva

  • 100 Points 100 badge 2x thumb
I have changed it as below and it worked 

var field = arguments[0], 
value = skuid.utils.decodeHTML(arguments[1]); 

skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value); 

if (field.mode == 'readonly' && value === false) 

    { 

        field.item.element.addClass("highlighted-row");


    }


table.nx-skootable-data tbody tr.highlighted-row td {       background-color: lightblue;
}