1

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

dsi
  • 3,199
  • 12
  • 59
  • 102
  • http://stackoverflow.com/questions/5553177/jqgrid-alternate-row-background – Kiran Feb 21 '14 at 13:41
  • http://stackoverflow.com/questions/19841588/jqgrid-change-background-color-of-grouping-header – Kiran Feb 21 '14 at 13:42
  • tried, `$(".ui-jqgrid tr.jqgrow:odd").css("background-color", "red");` , $("tr.jqgrow:odd").css("background", "#FCF9E6"); but unable to change alternate row color. remain as it is. – dsi Feb 21 '14 at 13:49

1 Answers1

3

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;
}
Community
  • 1
  • 1
UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92