Add the ability to format FeatureTable column cells

281
0
02-20-2015 10:00 AM
Status: Open
roemhildtg
Occasional Contributor III
The new FeatureTable is nice, but it lacks the ability to format column cells. For example, if I have a field that is a link to a webpage, it is impossible to open that link in the current widget. I cannot select the text to highlight it and copy it, and clicking on the link simply selects the dgrid row. 

The ability to specify a formatter function that would format the text into a clickable link would be fantastic and is necessary.

Example:
var formatURL = function (url) {
        if (!url || url.length < 5) {
            return 'N/A';
        } else {
            return  '<a href="' + url + '">Link</a>';
        }
    };

new FeatureTable({ 
featureLayer: fl,
map: map,
fieldInfos: [
{fieldName: 'url_field',
format: formatURL
label: 'The Website'
}]
}, 'tableNode' );