3.2.0

Altering the style of a cell

I'm trying to alter the style of text in a cell:-

myGrid.getCellTemplate(1,1).setStyle('font-size', '8pt');
myGrid.getCellTemplate(1,1).setStyle('font-weight', 'bold');

Unfortunately this only seems to affect the template rather than the cell text - is there another way I can do this?

Another way I've tried which works, but when sorted loses the formatting:-

var cell = document.getElementById("myGrid-cell-1-1-box-text");
if (cell.style)
{
var style = cell.style;
style.fontSize='8pt';
style.fontWeight='bold';
}

Many thanks,

Steve
Steve
October 3,
Strange. The code above works fine for me. Could this be a conflict with some of your stylesheets?
Alex (ActiveWidgets)
October 4,

This topic is archived.

See also:


Back to support forum