Skip to content Skip to sidebar Skip to footer

How To Remove Zebra Striping From Ng-grid

Seems like this should be an easy thing to do, but I'm not finding it. An ng-grid is zebra striped by default, how do I remove it?

Solution 1:

Add this to your style to override the zebra css:

<style>.ngRow.even {
        background-color: rgb(255, 255, 255);
    }
    .ngRow.odd {
        background-color: rgb(255, 255, 255);
    }
</style>

This will make both rows white. Change it to whatever color you need.

Solution 2:

If you are going to add the modifications in a stylesheet after the ngGrid stylesheet (ngGrid.css), you should do it this way for avoiding losing ngRow.selected class

.ngRow.even {
    background-color: #ffffff;
}

.ngRow.odd {
    background-color: #ffffff;
}

.ngRow.selected {
    background-color: #BDD5FF;
}

Solution 3:

It's much better to customize your theme and add:

odd-row-background-color: null

Post a Comment for "How To Remove Zebra Striping From Ng-grid"