:: Forum >>

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
Wednesday, March 1, 2006
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)
Wednesday, March 1, 2006
Thanks, that works!
Raj
Wednesday, March 1, 2006

This topic is archived.


Back to support forum

Forum search