var myData = [
['Row 1','5/10/2004','','','0','1']
,['Row 2','5/10/2004','','','0','4']
,['Row 3','5/10/2004','','','0','5']
,['Row 4','5/10/2004','','','0','6']
,['Row 5','5/11/2004','','','0','11']
,['Row 6','5/11/2004','','','0','13']
,['Row 7','5/11/2004','','','0','14']
,['Row 8','5/13/2004','','','0','18']
,['Row 9','5/13/2004','','','0','19']
,['Row 10','5/13/2004','','','0','20']
,['Row 11','5/13/2004','','','0','22']
,['Row 12','5/13/2004','','','0','23']
,['Row 13','5/13/2004','','','0','24']
,['Row 14','5/18/2004','','','0','25']
,['Row 15','5/18/2004','','','0','27']
,['Row 16','5/18/2004','','','0','32']
,['Row 17','5/18/2004','','','0','35']
,['Row 18','5/18/2004','','','0','36']
,['Row 19','5/19/2004','1/30/2006','4/1/2005','0','38']
,['Row 20','5/19/2004','7/1/2004','6/30/2004','2','41']
,['Row 21','5/20/2004','','','0','42']
,['Row 22','5/20/2004','','','90','44']
,['Row 23','5/24/2004','','','0','46']
,['Row 24','5/24/2004','','','0','47']
];
var myColumns=["Name","Created (date)","End (date)","Start (date)","Hours","ID"];
var obj = new Active.Controls.Grid;
var string = new Active.Formats.String;
string.dataToValue = function(data){return data.toUpperCase();};
var date = new Active.Formats.Date;
var number = new Active.Formats.Number;
obj.setRowCount(myData.length);
obj.setColumnCount(myColumns.length);
number.setTextFormat("#");
date.setDataFormat("auto");
date.setTextFormat("dd/mm/yyyy");
date.setErrorText("_Undefined");
date.setErrorValue("-1");
var formats=[string,date,date,date,number,number];
obj.setColumnText(function(i){return myColumns[i]});
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j])});
obj.setDataValue(function(i, j){return formats[j].dataToValue(myData[i][j])});
This topic is archived.