:: Documentation >>

cell link

Sets or retrieves the link URL in the grid cells (cell link). Requires link template (AW.Templates.Link).

Syntax

var value = obj.getCellLink(); 
obj.setCellLink(value);        

obj.onCellLinkChanging = function(value){...}; 
obj.onCellLinkChanged = function(value){...}; 
obj.onCellLinkError = function(value){...}; 

Defined in

cell model

Examples

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

Remarks

To specify the link target use setAttribute() method -

var link = new AW.Templates.Link;
link.setAttribute("target", "_new");
obj.setCellTemplate(link, 0);

See also

Grid templates: cell, link template
Cell model: text, image, tooltip, value, data, format, editable, state, selected
Link properties: selector, header, footer, top, bottom

Comments

Defaulter text to a cell link Cell link (2)
disable a link merlin (0)
link only works if shift key is held down (1)
how to open new window by link qian xian jie (1)
getting cell links from AW.XML.Table Gary (2)
cell links via AW.XML.Table? Gary (1)
setCellLink in 2.0 (5)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5