/ Published in: JavaScript
getRowClass changes the row CSS properties its applied for, but inside a row each cell element will have its own CSS class again.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
grid.getView().getRowClass = function(record, index){ return (record.data.change<0.7 ? (record.data.change<0.5 ? (record.data.change<0.2 ? 'red-row' : 'green-row') : 'blue-row') : ''); }; .blue-row .x-grid3-cell-inner{ color:blue; } .red-row .x-grid3-cell-inner{ color:red; } .green-row .x-grid3-cell-inner{ color:green; }