标题列包含 审核通过则绿色,包含拒绝为红色:
{
xtype: 'gridcolumn',
renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
metaData.tdAttr = 'data-qtip="'+record.data.Content+'"';
if(record.data.Content.indexOf('审核通过')!=-1)
{
metaData.style="color:green";
}
else if(record.data.Content.indexOf('拒绝')!=-1)
{
metaData.style="color:red";
}
return value;
}
,
'*',
dataIndex: 'Title',
text: '标题'
}
原文地址:http://www.cnblogs.com/xuejianxiyang/p/4997981.html