We don't directly use Active.Templates.Link objects. Here's what we do:
// All this javascript is dynamically generated
var colOrder = [0,2,1,3,4];
var gridData = [
[ "<a href=\"
http://blahblah\">Some link here</a>", "Other data"],
[ "<a href=\"
http://blahblah2\">Another link here</a>", "More data"],
etc, etc
];
var myGrid = new Active.Controls.Grid;
myGrid.setRowCount(rows);
myGrid.setColumnCount(cols);
// The following method permits us to dynamically change the order
// of columns, based on the array colOrder
myGrid.setDataText(function(i, j){
return myData[i][colOrder[j]];
});
var row = new Active.Templates.Row;
var alternate = function() {
return this.getProperty("row/order") % 2 ?
"white" :
"#EBF4F6";
}
row.setStyle("background", alternate);
myGrid.setTemplate("row", row);
myGrid.setStyle("font-size", "10pt");
myGrid.setStyle("font-family", "Arial, Verdana, sans-serif");
myGrid.setId("POPULATION");
// "sort" is a javascript function which handles calls an AJAX
// link to dynamically handle sorting
try {
myGrid.setAction("columnSort", sort);
} catch (error) {}
document.write(myGrid);
Thanks for any help.....
bump...
This topic is archived.