There are many methods to set alternate row color for jqgrid.
We can use altRow and altClass property in jqgrid for achieving this. Following is my code:
altRows:true,
altclass:’myAltRowClass’
and CSS is
.myAltRowClass
{
background-color: Fuchsia;
background-image:none;
}
2. By adding a new CSS class to jqgrid.css we can achieve this. Below is the steps to do this
1. Set grid property altRows:true,
2. Add the below CSS class to end of grid.css
.ui-jqgrid tr.ui-priority-secondary td { background-color: #DDDDDD; }
3. Without using altRows and altClass property.
loadComplete: function() {
$(“tr.jqgrow:odd”).css(“background”, “#DDDDDC”);