:: Forum >>

Formatting Has No Effect

I've used the following code which appears elsewhere on the site. However, it has no effect on the display. The column continues to have string-based sorting and no visible formatting.

var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
grid.setCellFormat(number, 1);

...

document.write(grid);
Kevin
Monday, August 27, 2007
I take part of that back. The column does have numeric sorting, but the display does not use the $ sign, commas, and such as the formatting string above specifies.
Kevin
Monday, August 27, 2007
If you put the data into cellText property formatting does not work because cellText goes directly into the cells html. To activate formatting use cellData property - in this case the dataToText method of the formatting object will be called before showing the data.

grid.setCellData(...);
grid.setCellFormat(...);
Alex (ActiveWidgets)
Monday, August 27, 2007

This topic is archived.


Back to support forum

Forum search