3.2.0

setCellImage

Has anyone been able to add an image to a Grid cell? I only get text and no image with the code below:

var obj = new AW.UI.Grid;
var myColumns = [
"Date", "Summary", "Staff", "Status", "Type", "Tech."
];
obj.setRowCount(3);
obj.setColumnCount(6);
obj.setHeaderText(myColumns);

obj.setCellImage("home",0,0);
obj.setCellText("Hi",1,0);
obj.setCellImage("home",1,0);

obj.setCellEditable(true);
document.write(obj);

Any help would be greatly appreciated.
Raj
March 1,
The default cell template is AW.Templates.Text and it does not show images. You should use AW.Templates.ImageText or AW.Templates.Image instead -

obj.setCellTemplate(new AW.Templates.ImageText);
Alex (ActiveWidgets)
March 1,
Thanks, that works!
Raj
March 1,

This topic is archived.

See also:


Back to support forum