[Data Grid] [ HowTo ] - Conditional Highlight Rows Based on Cell Value

Forge Component
(26)
Published on 31 Jul by OutSystems R&D
26 votes
Published on 31 Jul by OutSystems R&D

Hi,


I have to highlight all rows based on the cell value. I have a column called "Status" When its value is "Approved", I want to highlight the entire row. How do I do that?


Regards,

George Qiao

I figured out myself.


1. Add CSS (use Chrome F12 to capture the CSS in your specific case)

.wj-cell.Approved {
    background-color: #5c656d;
}

.wj-cell.Reviewed {
    background-color: #c7e3a2;
}


2. Write your own javascript:



3. go tot he data grid field and register this javascript function