6
Bir ızgarada bulunan değerlere bağlı olarak bir DojoX (1.2.3) Izgarası içinde bir Satır stili oluşturmaya çalışıyorum.Stil Dojox Grid Satır
GridLayout:
var view1 = {
noscroll: true,
rows: [{
field: 'TASK_ID',
name: 'ID',
width: '80px',
get: this.getColor
}, {
field: 'MENUPOINT',
name: 'Action',
width: '250px'
}]
};
getColor Fonksiyonu:
getColor: function(inRowIndex) {
console.log(inRowIndex);
grid = dijit.byId('gridTaskCurrent');
// if task_id = 1 style row with other background(?)
},
Ve nasıl her satırdan task_id değeri elde ve birisi varsa .. satır için bir stili ayarlamak için hiçbir fikrim yok İyi bir bağlantı ya da nasıl yapılacağını bilir .. bu harika olurdu.
dojo.connect(dijit.byId('gridTaskCurrent'), 'onStyleRow' , this, function(row) {
var item = grid.getItem(row.index);
if (item) {
var type = grid.store.getValue(item, "LOCKED", null);
if (type == 1) {
row.customStyles += "background-color:limegreen;";
}
}
grid.focus.styleRow(row);
grid.edit.styleRow(row);
});
: