:: Forum >>
one link each row
The ActiveWidgets Grid is soooo cool - but also huge and it is confusing me :-)
I can add a link to one column without any problem. But I am simply not able to set a link for each row. How can I set a link to a row?
I searched in the forum but could not find the solution.
Thanks in advanced
Koni
Koni
Tuesday, November 23, 2004
Sorry for posting again but I cannot find the solution.
I have a table with 5 columns and 20 rows. Now I can add a hyperlink to a column (e.g. column 3) with this code:
var link = new Active.Templates.Link;
link.setAttribute("href", "http://www.google.com");
obj.setColumnTemplate(link, 2);
Now I need the hyperlink not for a column - I need to set a link for each row. How can I set a hyperlink to a row? (It must be easy, but how?)
Thanks, Koni
Koni
Wednesday, November 24, 2004
This might help. link can be stored in 6th column (index 5), which is not visible.
obj.setAction("selectionChanged", scHandler);
var scHandler = function() {
var selectionIndex = this.getSelectionProperty("index");
if(selectionIndex != null) {
var linkCol = this.getDataProperty("text", selectionIndex, 5);
document.location = linkCol;
}
}
obj.setAction("selectionChanged", scHandler);
Cheers,
Sudhaker
Sudhaker Raj
Wednesday, November 24, 2004
This topic is archived.
Back to support forum
Forum search