I am new to Angular and UI Grid I am trying to color the cell of the UI Grid when a particular value is been displayed for that purpose I am using the cellcalss property in columndef of GridOptions
$scope.gridOptions = {
enablePaginationControls: false,
paginationCurrentPage:1,
data:scdet.data,
columnDefs: [
{name: 'Route Number', field: 'RouteNumber' },
{
name: 'Load Ready', field: 'LoadReady', cellClass: function (grid, row, col, rowRenderIndex, colRenderIndex) {
if (grid.getCellValue(row, col).toLowerCase() === 'No') {
return 'semi-red';
}
}
},
{
name: 'Start of Day', field: 'SOD', cellClass: function (grid, row, col, rowRenderIndex, colRenderIndex) {
if (grid.getCellValue(row, col).toLowerCase() === 'No') {
return 'semi-red';
}
}
},
{name: 'End of Day', field: 'EOD'},
{name: 'Cut off', field: 'Cutoff'},
{name: 'Settlement', field: 'Settlement'},
{name: 'Closed', field: 'Closed'}
]
};
CSS for this
.semi-red
{
background-color:#DC143C;
}
but the red color is not displaying, anyone please pointout to me what I am doing wrong in this code