- var cm = new Ext.grid.ColumnModel([
- {header:'编号' ,dataIndex:'id' },
- {header:'性别' ,dataIndex:'sex' ,renderer:function (value){
- if (value == 'male' ) {
- return "<span style='color:red;font-weight:bold;'>红男</span>" ;
- } else {
- return "<span style='color:green;font-weight:bold;'>绿女</span>" ;
- }
- }},
- {header:'名称' ,dataIndex:'name' },
- {header:'描述' ,dataIndex:'descn' }
- ]);
Extjs的grid表格设置单元格的值(设置该行的记录的颜色)
最新推荐文章于 2019-01-10 11:15:37 发布