【发布时间】:2016-02-11 13:08:47
【问题描述】:
这里是 JavaScript,我在其中为那些在 BusinessObject 列和 CustomTable 列中包含不同数据的字段设置背景颜色。
projectgrid= new Ext.grid.GridPanel
({
id:projectgrid,
cm : projectInfoFieldsCM,
store: inlineGridStore,
stripeRows: true,
autoScroll:true,
width:550,
height:500,
bodyCssClass : 'customInlineGridCSS',
viewConfig:
{
forceFit: false,
autoFill : false,
deferEmptyText : false,
emptyText : '<div align="center"><span style="font-size: 9pt; font-weight: normal">No record available</span></span></div>',
getRowClass: function(record, index, rowParams, store) {
if(record.get('BusinessObject')!=record.get('CustomTable')){
return 'gender-male';
}
}
}
});
这里是 css 文件,我在其中指定了颜色编码。 注意:我尝试了在 css 文件中声明的两个 ID。
.data-row-light-red
{
background-color: #ff0000 !important ;
}
.gender-male .ID {
background-color: #088da5;
}
我做错了什么,因为我之前已经实现了这个功能,但我被困在这个功能中了吗?
【问题讨论】:
-
.gender-male .ID.ID这里是什么?我只用.gender-male尝试了这段代码,一切正常,整个网格行的背景颜色发生了变化。
标签: javascript extjs extjs3