:: Forum >>

Combo Template in Grid for particular cell

I'm trying to implement this code in my grid, but instead of using a whole column, is there a way of only having it function for a particular cell?

var obj = new AW.UI.Grid;

obj.setCellText(function(i, j){return j + "." + i});
obj.setColumnCount(10);
obj.setRowCount(10);

obj.setCellTemplate(new AW.Templates.Combo, 1);

obj.setPopupTemplate(function(col, row){

var grid = this;
var list = new AW.UI.List;

list.setItemText(["text1", "text2", "text3"]);
list.setItemCount(3);

list.onItemClicked = function(event, i){
var text = this.getItemText(i);
grid.setCellText(text, col, row);
grid.setCellValue(text, col, row);
grid.getCellTemplate(col, row).hidePopup();
}

return list;
});

document.write(obj);
Josh Johnson
Wednesday, May 3, 2006
yes, just specify both column and row indices -

obj.setCellTemplate(new AW.Templates.Combo, 1, 1);
Alex (ActiveWidgets)
Wednesday, May 3, 2006

This topic is archived.


Back to support forum

Forum search