Ext4.2 Ext.grid.GridPanel根据某列改变行的颜色
EXT
viewConfig: { getRowClass: function(record, rowIndex, rowParams, store){ if(record.data.state=='1'){ return 'x-grid-record-red'; } //else{ // return 'x-grid-record-yellow'; //} } },
css
.x-grid-record-red .x-grid-cell{ background: #E6D1E3; } .x-grid-record-yellow .x-grid-cell{ background: #F3FEC2; } .x-grid-record-green .x-grid-cell{ background: #92FCCC; }
如今的编程是一场程序员和上帝的竞赛,程序员要开发出更大更好、傻瓜都会用到软件。而上帝在努力创造出更大更傻的傻瓜。目前为止,上帝是赢的。
QQ:6203142
-----在北京的四川小伙