我正在尝试根据网格中的值来设置DojoX(1.2.3)网格内部的行样式。
GridLayout:
颜色函数:
我不知道如何从每一行获取task_id值并为该行设置样式。如果有人有好的链接或知道如何做,那就太好了。
GridLayout:
var view1 = {
noscroll: true,
rows: [{
field: 'TASK_ID',
name: 'ID',
width: '80px',
get: this.getColor
}, {
field: 'MENUPOINT',
name: 'Action',
width: '250px'
}]
};
颜色函数:
getColor: function(inRowIndex) {
console.log(inRowIndex);
grid = dijit.byId('gridTaskCurrent');
// if task_id = 1 style row with other background(?)
},
我不知道如何从每一行获取task_id值并为该行设置样式。如果有人有好的链接或知道如何做,那就太好了。