How can we highlight a specific set of rows in an Ext.net gridPanel
by changing their color?
Currently, the GridPanel renders using the following function:
function (value, meta, record, rowIndex,columnIndex,store)
{
color= record.data["ColorValue"];
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.cssClass'+rowIndex+' { background color:'+color+'}';
document.getElementsByTagName('head')[0].appendChild(style);
grid.store.getAt(rowIndex).set("mySelected", "cssClass"+rowIndex);
}
However, this approach highlights all the rows with the same color. A test alert(color);
revealed that each row actually has a different color.
Is there a better way to achieve this and highlight only the specific set of rows?