更新时间:2023-11-26 11:12:04
这样做的方法是在网格上定义viewConfig
:
The way to do it is to define viewConfig
on the grid:
Ext.create('Ext.grid.Panel', {
...
viewConfig: {
getRowClass: function(record, index, rowParams, store) {
return record.get('someattr') === 'somevalue') ? 'someclass' : '';
}
},
...
});