:: Forum >>
XML Table setFormats()
What am I doing wrong? I took the AW 2.4 sample "xml - simple.htm" file and added the following code seen in bold:
[b]var string = new AW.Formats.String;
var number= new AW.Formats.Number;
number.setTextFormat('#,###.##');[/b]
var table = new AW.XML.Table;
table.setURL("../data/companies-simple.xml");
[b]table.setFormats([string, string, string, string, number]);[/b]
table.request();
But the result I get, is that at row number 4 I get all NaNs except for the last column. Furthermore, this is is the row that has the format correct for the entire column.
I also tried adding the following before the setFormats() command with the same results:
table.setColumns(["ticker", "name", "mktcap", "sales", "employees"]);
Rick Villela
Monday, November 7, 2005
Oops! I guess the BOLD tags do not work within the CODE tags, but I think you can see what code I added.
Rick Villela
Monday, November 7, 2005
This seems to have been fixed in AW 2.0 b2
Rick Villela
Tuesday, November 8, 2005
just a comment, I am making my declarations on a column by column basis.
table.setFormat(number, 11);
table.setFormat(number, 12);
etc and it works fine for me, not that this solves your problem.
Jim Shaffer
Wednesday, November 9, 2005
Alex (ActiveWidgets)
Wednesday, November 9, 2005
This topic is archived.
Back to support forum
Forum search