需要以 Ext.netgridPannel
颜色突出显示需要突出显示的一组行
当前的方法是在渲染 GridPannel 时调用以下函数:
function (value, meta, record, rowIndex,columnIndex,store)
{
color= record.data["ColorValue"];
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.cssClass'+rowIndex+' { background color:'+color+'}';
document.getElementsByTagName('head')[0].appendChild(style);
grid.store.getAt(rowIndex).set("mySelected", "cssClass"+rowIndex);
}
但是使用这种方法:它突出显示具有相同颜色的所有行.. 测试alert(color);
从 GridPannel 获取每种颜色的正确不同颜色
有什么好的方法吗?