grid行ハイライト表示
3160 ワード
grid
関数#カンスウ#
var grid = new Ext.RSEGrid({ //
id: 'O005_grid',
title: ' ',
loadMask: true,
autoScroll: true,
width: prj.swidth * 0.46,
height: prj.sheight * 0.6,
border: 1,
store: p_store,
sm: sm,
cm: gridColumns,
buttonAlign: 'left',
bbar: pagebar,
contextmenu: true,
split: true,
region: 'north',
listeners: {
afteredit: function (e) {
RenderColor(grid.getStore());
},
sortchange: function (ct, column, direction, eOpts) {
RenderColor(grid.getStore());
}
}
})
p_store.on('load', function (s, records) {
RenderColor(s);
})
関数#カンスウ#
function RenderColor(s) {
var girdcount = 0;
s.each(function (r) {
if (r.data.DRAW_STAT2 == "9" || r.data.DRAW_STAT2 == 9) {
for (var kk = 0; kk < columnCount; kk++) {
grid.getView().getCell(girdcount, kk).style.backgroundColor = '#FFFF00';
}
}
if (r.data.DRAW_STAT2 == "7" || r.data.DRAW_STAT2 == 7) {
for (var kk = 0; kk < columnCount; kk++) {
grid.getView().getCell(girdcount, kk).style.backgroundColor = '#00FF7F';
}
}
girdcount++;
})
}