How to set alternative row color and background color of jqgrid

dsi picture dsi · Feb 21, 2014 · Viewed 9.4k times · Source

In jqgrid, i need below points to do: 1. Set alternate row background color of jqgrid. 2. Set Header background color of jqgrid.

Please share me which style i should add into my page or any jquery script to achieve that ?

Thanks

Answer

UdayKiran Pulipati picture UdayKiran Pulipati · Feb 22, 2014

Previously asked question of mine jqgrid odd even row color solves your problem for changing jqgrid background color.

Step: 1 Change column background color in jqgrid using css

loadComplete: function() {
    $("tr.jqgrow:odd").css("background", "#E0E0E0");
},

Step: 2 Change header color of jqgrid use below css class.

.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
    border-bottom: 0 none;
    border-top: 0 none;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    background: orange;
}