:: Forum >>

Multiple dynamic links

How do we get different columns to have different links set dynamically.

I tried the following:
// setting column 1 to a link using url in column 4
var link1 = new Active.Templates.Link;
link1.setAttribute("target", "_new")
mydatagrid.setColumnTemplate(link1, 1);
mydatagrid.setProperty("data/link", function(i, j){ if(j==1) {
return "" + mydatagrid.gridData[i][4];
}});
mydatagrid.refresh();

// setting column 0 as a link combined with text and data from column 6
var link0 = new Active.Templates.Link;
link0.setAttribute("target", "_new")
mydatagrid.setColumnTemplate(link0, 0);
mydatagrid.setProperty("data/link", function(i, j){ if(j==0) {
return "http://www.awebsite.com/index.php?value=" + mydatagrid.gridData[i][6];
}});


Each of these alone works great, but when i need both on one grid, the 2nd
mydatagrid.setProperty("data/link",
overwrites the first one....

Any ideas?

Frank
Sunday, December 5, 2004

This topic is archived.


Back to support forum

Forum search