【问题标题】:How to set alternative row color and background color of jqgrid如何设置jqgrid的替代行颜色和背景颜色
【发布时间】:2014-03-23 01:30:58
【问题描述】:

在 jqgrid 中,我需要做以下几点: 1.设置jqgrid的交替行背景颜色。 2.设置jqgrid的Header背景颜色。

请分享我应该在我的页面中添加哪种样式或任何 jquery 脚本来实现这一点?

谢谢

【问题讨论】:

标签: jqgrid jqgrid-asp.net mvcjqgrid


【解决方案1】:

我之前提出的问题jqgrid odd even row color 解决了您更改 jqgrid 背景颜色的问题。

步骤:1 使用 css 更改 jqgrid 中的列背景颜色

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

步骤:2 更改 jqgridheader color 在 css 类下使用。

.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;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-06
    • 2010-11-21
    • 1970-01-01
    • 2016-10-04
    • 1970-01-01
    • 2012-02-28
    • 2010-12-11
    • 1970-01-01
    相关资源
    最近更新 更多