shadowhunter_077 shadowhunter_077 - 5 months ago 71
CSS Question

cellClass is not working for angular ui grid

Here is my code:

for (var i = 0; i < gridData.length; i++) {
var currentData = gridData
$.each(currentData, function(key, value) {
if (!angular.isFunction(value)) {
name : key,
cellClass : 'red',
$scope.gridOptions = {
columnDefs : $scope.columnDefs
$ = data;

background-color: #ff0000;
color: #ffffff;

<div ng-controller="GridController" id="grid1">
<div ui-grid="gridOptions" class="grid"></div>

When I replace
property from
array it's absolutely worked fine but when I add
property to
array my grid doesn't display data. On inspecting
ui-grid dom
my data is binded with
ui-grid cell
but doesn't appear on ui.


simply overide this two css class in ui.grid.css

   .ui-grid-row:nth-child(odd) .ui-grid-cell {

.ui-grid-row:nth-child(even) .ui-grid-cell {


Remove background-color css from the above mention css classes in ui-grid.css