:: Forum >> Version 2 >>

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(ij){return "." i});
    
obj.setColumnCount(10);
    
obj.setRowCount(10);

    
obj.setCellTemplate(new AW.Templates.Combo1);

    
obj.setPopupTemplate(function(colrow){

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

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

        list.
onItemClicked = function(eventi){
            var 
text this.getItemText(i);
            
grid.setCellText(textcolrow);
            
grid.setCellValue(textcolrow);
            
grid.getCellTemplate(colrow).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