:: Home >>

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

9 May 06
link only works if shift key is held down (1)
25 Apr 06
how to open new window by link qian xian jie (1)
22 Mar 06
getting cell links from AW.XML.Table Gary (2)
21 Mar 06
cell links via AW.XML.Table? Gary (1)
23 Jan 06
setCellLink in 2.0 (5)

Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1
2.5
Release History
2.5
2.0.2
textToValue
textToData