Extjs grid设置单元格字体颜色,单元格背景颜色,行背景颜色
一.在ColumnModel中用renderer渲染颜色:
1.不定义样式:
(1).字体颜色:
{
header:"审核状态",...important;
}
//Extjs:
/*-----1.创建数据源-----*/
var epStore = new Ext.data.JsonStore({
autoLoad: true,...var grid = new Ext.grid.GridPanel({
store:epStore,
cm:cm,
sm:sm,
view: epView,
loadMask:{msg:'正在加载数据...epStore,
displayInfo: true,
displayMsg: '当前显示 {0} - {1} ,共{2}条记录',
emptyMsg: "没有数据...",
items: ['-']
})
});
注:
1.用GridView中的getRowClass方法来实现颜色的渲染,status是在Store中定义的字段
2.要记得在