Hi
Is it possible to give background color or change Font of particular cell in tree grid?.
Printable View
Hi
Is it possible to give background color or change Font of particular cell in tree grid?.
Hi,
Please use Renderer for Column
Code:<Renderer Fn="myCellRenderer"/>
Code:var myCellRenderer = function(value, metaData, record, rowIndex, colIndex, store) {
if(rowIndex == 5 && colIndex == 1){
metaData.css = 'name-of-css-class-you-will-define';
}
return value;
};
or
var myCellRenderer = function(value, metaData, record, rowIndex, colIndex, store) {
if(rowIndex == 5 && colIndex == 1){
return String.format("<span style='background-color:red;'>{0}</span>", value);
}
return value;
};
Im using a TreeGrid control. My question is how to have coloured rows? There is no renderer sub element available.