3.2.0

JS setCellFormat() does not work in 2.0b3

It appears that none of the formats (number, date, ...) work for JS arrays in AW version 2.0b3
Rick Villela
December 12,
I can confirm this. No matter what i do formats do not seem to work for JS arrays.
Joe
January 3,
Yes, I conccur...

How is this supposed to work?
Peg
January 30,
Is this still an issue with Beta 4? I was under the impression that Beta 4 fixed a lot of the format issues. What specific issues are you having now with Beta 4?
Jim Hunter
January 30,
Cell formatting works if you assign your data using setCellData() method and want it to be converted to cell text -

var myData = [
        ["text", "123", "12-1-2005"],
        ["more text", "56.1", "3-21-2004"]
    ]

    var str = new AW.Formats.String;
    var num = new AW.Formats.Number;
    var date = new AW.Formats.Date;

    num.setTextFormat("###.##");
    date.setTextFormat("d-mmm-yyyy");

    var obj = new AW.UI.Grid;

    obj.setCellData(myData);
    obj.setCellFormat([str, num, date])

    obj.setColumnCount(3);
    obj.setRowCount(2);

    document.write(obj);


If you assing the array directly to the cell text using setCellText() method - then formatting will not work because the cell text is exactly what you see. In this case formatting objects are only used during sorting to provide reverse transformation (textToValue).
Alex (ActiveWidgets)
January 30,

This topic is archived.

See also:


Back to support forum