cell format
I copied the following code into my program and it prevents my the loading of the grid and data. If I comment it out, the grid works fine.
Any ideas why this might happen.
var string = new AW.Formats.String;
var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");
date.setTextFormat("mm/dd/yy");
grid.setCellFormat([string, number, number, date]);
Here is my grid:
var grid = new AW.UI.Grid;
grid.setSize(725, 300);
grid.setPosition(20, 100);
grid.setHeaderText(myColumns);
//grid.setCellText(myData);
grid.setColumnCount(4);
grid.setSelectionMode("single-row");
grid.setSelectedRows([1]);
grid.getRowTemplate().setClass("text", "wrap");
grid.setCellTemplate(new AW.Templates.ImageText);
//****Here is where the problem is
//var str = new AW.Formats.String;
//var num = new AW.Formats.Number;
//var date = new AW.Formats.date;
//date.setDataFormat("ISO8601");
//date.setTextFormat("mm/dd/yy");
//grid.setCellFormat([date,str,str,str);
//****end of problem
grid.setCellModel(table);
grid.setColumnIndices([0,1,2,3]);
grid.setSelectorVisible(true);
grid.setSelectorWidth(28);
grid.setSelectorText(function(i){return this.getRowPosition(i)});
grid.setRowCount(5);
grid.setCellEditable(false);
Any ideas why this might happen.
var string = new AW.Formats.String;
var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
var date = new AW.Formats.Date;
date.setDataFormat("ISO8601");
date.setTextFormat("mm/dd/yy");
grid.setCellFormat([string, number, number, date]);
Here is my grid:
var grid = new AW.UI.Grid;
grid.setSize(725, 300);
grid.setPosition(20, 100);
grid.setHeaderText(myColumns);
//grid.setCellText(myData);
grid.setColumnCount(4);
grid.setSelectionMode("single-row");
grid.setSelectedRows([1]);
grid.getRowTemplate().setClass("text", "wrap");
grid.setCellTemplate(new AW.Templates.ImageText);
//****Here is where the problem is
//var str = new AW.Formats.String;
//var num = new AW.Formats.Number;
//var date = new AW.Formats.date;
//date.setDataFormat("ISO8601");
//date.setTextFormat("mm/dd/yy");
//grid.setCellFormat([date,str,str,str);
//****end of problem
grid.setCellModel(table);
grid.setColumnIndices([0,1,2,3]);
grid.setSelectorVisible(true);
grid.setSelectorWidth(28);
grid.setSelectorText(function(i){return this.getRowPosition(i)});
grid.setRowCount(5);
grid.setCellEditable(false);
August 5,