<style>
.x-grid-record-red table{
background: #E6D1E3;
}
.x-grid-record-yellow table{
background: #F3FEC2;
}
.x-grid-record-green table{
background: #92FCCC;
}
</style>
var qGridPanel = new Ext.grid.GridPanel({
// 表格面板标题,默认为粗体,我不喜欢粗体,这里设置样式将其格式为正常字体
title : '<span class="commoncss">我发起的工作任务</span>',
height : 500,
id : 'id_grid_jobTaskinfo',
autoScroll : true,
frame : true,
region : 'center',
store : qGridStore,
stripeRows : true,
cm : qGridColumns,
tbar : tbar,
bbar : bbar,
viewConfig : {
getRowClass : function(record,rowIndex,rowParams,store){
if(record.data.status == '3' || record.data.status == '7' || record.data.status == '8'){ //正常关闭、责任人原因中止、发起人原因中止
return 'x-grid-record-red';
}
if(record.data.status == '2' || record.data.status == '5' || record.data.status == '6'){
return 'x-grid-record-yellow';
}
if(record.data.status == '1' || record.data.status == '4'){
return 'x-grid-record-green';
}
}
}
,
loadMask : {
msg : '正在加载表格数据,请稍等...'
}
});