Sets or retrieves the link URL in the grid cells (cell link). Requires link template (AW.Templates.Link).
var value = obj.getCellLink();
obj.setCellLink(value);
obj.onCellLinkChanging = function(value){...};
obj.onCellLinkChanged = function(value){...};
obj.onCellLinkError = function(value){...};
Single cell
obj.setCellText("Search", 0, 0);
obj.setCellLink("http://www.google.com", 0, 0);
obj.setCellTemplate(new AW.Templates.Link, 0, 0);
2-d array
var myLinks = [
["#url-0-0", "#url-1-0", "#url-2-0"],
["#url-0-1", "#url-1-1", "#url-2-1"]
]
obj.setCellLink(myLinks);
obj.setCellTemplate(new AW.Templates.Link);
Function
var myLinks = function(column, row){
return "#" + row;
}
obj.setCellLink(myLinks);
obj.setCellTemplate(new AW.Templates.Link, 0); // column-0
To specify the link target use setAttribute()
method -
var link = new AW.Templates.Link;
link.setAttribute("target", "_new");
obj.setCellTemplate(link, 0);
Grid templates: cell, link template
Cell model: text, image, tooltip, value, data, format, editable, state, selected
Link properties: selector, header, footer, top, bottom