我需要更改网格单元格的背景,用我的代码更改文本颜色:
getRowClass: function(record, rowIndex, rowParams, store){
var grupo = record.get("tipo");
if (grupo == 'G'){
console.log('Grupo');
return 'redUnderlinedText';
}
.redUnderlinedText {
background-color: blue;// <= this code doesn't work
color: red;
text-decoration: underline;
cursor: pointer;
}
但我想更改单元格的背景,如下所示。
这可能吗?
感谢, 克劳迪奥。
答案 0 :(得分:0)
奇怪的是,您在网格上看到的背景是每个单元样式的结果。
所以这个:
.x-grid-cell {
background-color: red;
}
应该适用于所有未选择的单元格。
在你的情况下,我会尝试:
.redUnderlinedText . x-grid-cell {
background-color: blue !important;
color: red;
text-decoration: underline;
cursor: pointer;
}