SMART datagrid v.1 > Classes > LinkCellRenderer

Back  Forward

DataLudi.LinkCellRenderer.urlCallback  property

It specifies the callback function of returning the URL which will be transferred to tooltip or click event handler. 

You can also specify the text of containing the main body of function instead of callback function. GridBaseGrid], Dataset, Index parameters will be transferred to callback function in order. It is called from window scope. 

The URL can also be specified by urlField, url properties, and it takes precedence in the order of urlField, urlCallback, url

Defaults to null.

Getter
function urlCallback(): String|Function
Setter
function setUrlCallback(value: String|Function)
Code -1
    column.setRenderer({
        type: 'link',
        urlCallback: function (grid, dataset, index) {
            var v = ds.getValue(index.getDataIndex(grid), index.dataField);
            return v ? 'https://en.wikipedia.org/wiki/' + v : null;
        }
        // You can also specify only the main body of function.
        urlCallback: "var v = ds.getValue(index.getDataIndex(grid), index.dataField); " +
                     "return v ? 'https://en.wikipedia.org/wiki/' + v : null;"
    });
See Also
urlField
url
GridBase.onClickableCellClicked
Examples
Link Cell Renderer