flex.itemFormatter = function(panel, r, c, cell) {
var CellType = wijmo.grid.CellType;
if (panel.cellType !== CellType.Cell) return;
cell.style.backgroundColor = '';
cell.style.color = '';
cell.style.fontWeight = '';
var col = panel.columns[c];
var item = panel.rows[r].dataItem;
if (col.binding === 'sales') {
var pct = item.sales;
if (pct >= 80) {
cell.style.backgroundColor = '#d4edda';
cell.style.color = '#155724';
cell.style.fontWeight = 'bold';
} else if (pct >= 50) {
cell.style.backgroundColor = '#fff3cd';
cell.style.color = '#856404';
} else {
cell.style.backgroundColor = '#f8d7da';
cell.style.color = '#721c24';
}
}
};