【发布时间】:2011-11-10 15:06:40
【问题描述】:
如何在 dojo 数据网格中为单元格添加字体颜色?我需要动态更改颜色(取决于它获得的值)。我不想使用从 formatter 方法返回的 html 标签。
例如, 'number' 小于 0 为红色,大于 0 为蓝色。
在布局中,
number{
formatter : format
}
方法,
var format(value){
if(value<0){
// what should to returned to change font color without html tag?
}else if(value>0){
// what should to returned to change font color without html tag?
}
}
【问题讨论】:
-
不明白,要不要用html标签?
-
非常抱歉造成混淆