I am trying to change background color of angular ui-grid row based on condition so if riskValue is 1 trying to make it red and if value is 2 row background color should be Yellow. Any easy way to achieve this task ?
config.js
"columnDefs": [{
"name": "Ticket Number",
"field": "ticketNum",
"width": 120
},
{
"name": "Asset Id ",
"field": "assetID",
"width": 100
},
{
"name": "Severity",
"field": "severity",
"width": 100
},
{
"name": "Risk Index",
"field": "riskIndex",
"width": 100
},
{
"name": "Risk Val",
"field": "riskValue",
"cellTemplate": "<div ng-if=\"row.entity.Comments_Col1 != 'none'\" title={{row.entity.riskValue}} \" ><div style='white-space:nowrap;border-bottom: 1px solid red !important; height:100%;width:100%;'>{{row.entity.riskValue}}</div></div>",
"sort": {
"direction": "aesc",
"priority": 0
},
"width": 100,
"visible": false
}
],