3.0 beta 2

how do i add an image to the first column based on cell value?

ive searched and found several threads but did not find anything that worked. what i need is to add a column that only contains an icon that indicates if something is of low/normal/high priority like outlook based on the value.

thanks for any help in advance!
June 14,
You should use AW.Templates.Image class and also make a function which returns image names out of grid data -

var obj = new AW.UI.Grid;
    obj.setCellData(function(col, row){return col + "." + row});


    function image(col, row){
        if (this.getCellText(0, row) == "0.1") {
            return "search";
        else {
            return "favorites";

    obj.setCellTemplate(new AW.Templates.Image, 0);
    obj.setCellImage(image, 0);


see also

Alex (ActiveWidgets)
June 14,
thanks...worked perfect!
June 14,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.