I'm trying to color a row depending on it's value in the new angular-ui-grid 3.0 rc12 but I haven't been able to. The following code used to work in the previous version (ngGrid):
$scope.gridOptions =
data: 'data.sites'
tabIndex: -1
enableSorting: true
noTabInterference: true
enableColumnResizing: true
enableCellSelection: true
columnDefs: [
{field: 'sv_name', displayName: 'Nombre'}
{field: 'sv_code', displayName: 'Placa'}
{field: 'count', displayName: 'Cuenta'}
]
rowTemplate: """<div ng-class="{green: true, blue: row.getProperty('count') === 1}"
ng-repeat="col in colContainer.renderedColumns track by col.colDef.name"
class="ui-grid-cell"
ui-grid-cell></div>"""
and the corresponding css:
.grid {
width: 100%;
height: 250px;
}
.green {
background-color: #2dff07;
color: #006400;
}
.blue {
background-color: #1fe0f0;
color: #153ff0;
}
The problem here is that the expression:
row.getProperty('count') === 1
Doesn't work anymore as it did in ngGrid. Any guesses of how to achive the same in angular-ui-grid (ui-grid.info)
Thanks a lot!