Update:
It appears as if I was attempting to place an HREF link into the Value/Text property which was specified with a format of 'date'.
That was breaking my code and causing the data to not be displayed.
The resulting code is as follows:
var string = new Active.Formats.String;
var number = new Active.Formats.Number;
var date = new Active.Formats.Date;
number.setTextFormat("");
date.setDataFormat("ISO8601");
date.setTextFormat("yyyy-mm-dd");
date.setErrorText("");
date.setErrorValue(-1);
var myColumns = ["Company Name", "Product Name", "EPA Reg #", "TIRMS Date", "<img src='/images/icon_pdf_sm.gif'> Labels", "<img src='/images/icon_pdf_sm.gif'> MSDS", "<img src='/images/icon_pdf_sm.gif'> SUPPs", "<img src='/images/icon_pdf_sm.gif'> TBs"];
var formats = [string, string, string, date, date, date, date, date];
var obj = new Active.Controls.Grid;
obj.setRowProperty("count", myData.length);
obj.setColumnProperty("count", 8);
obj.setColumnText(function(i){return myColumns[i]});
obj.setColumnHeaderHeight("20px");
obj.setDataText(function(i, j){if ((j==4)||(j==5)||(j==6)||(j==7)){return myData[i][j];
}else{return formats[j].dataToText(myData[i][j]);}});
obj.setDataValue(function(i, j){if ((j==4)||(j==5)||(j==6)||(j==7)){return myData[i][j].replace(/<.+?>/g, "");
}else{return formats[j].dataToValue(myData[i][j]);}});
document.write(obj);
I specifically had to use
date.setDataFormat("ISO8601");
date.setTextFormat("yyyy-mm-dd");
and change the way I was retrieving the data from date columns within a table in SQL Server.
An example of how to get a nicely formatted date which the grid can process and subsequently sort on is:
SELECT CONVERT(CHAR(10),DocumentModifiedDT,126) as 'myDate' from tableName
Will return the date value as yyyy-mm-dd
ie. '2004-10-15'
HTH, as I've spent 3 full days learning how to make this work :-)