.x-grid-record-red table{//字体色
color: #FF0000;
}
.x-grid-record-green table{ //背景色
background: #00FF00;;
}
viewConfig : {
forceFit : true,
getRowClass : function(record,rowIndex,rowParams,store){
//禁用数据显示红色
if(record.data.mydata=="testdata"){
return 'x-grid-record-red';
}else{
return 'x-grid-record-green';
}
}
},
本文介绍如何使用 ExtJS 框架为 Grid 组件设置自定义样式,包括字体颜色和背景色。通过 JavaScript 实现根据不同条件显示不同颜色的数据行。
192

被折叠的 条评论
为什么被折叠?



