:: Forum >> Version 2 >>

AW.Templates.Combo, not displaying list items

I have the following code for AW.Templates.Combo in my grid. The grid starts, and displays initial values in the combo that exist from the datasource, but when I open the combo box to select a new value, there are no values listed.

I have 3 separate combo boxes in my grid, and I thought this would work:

// Set columns as combo box
    
obj.setCellTemplate(new AW.Templates.Combo1);
    
obj.setCellTemplate(new AW.Templates.Combo5);
    
obj.setCellTemplate(new AW.Templates.Combo6);
        
    
//  Populate the list, set the onItemClicked to move selection to cell, then hide the list.
    
obj.setPopupTemplate(function(colrow){
    
        var list = new 
AW.UI.List;
            if(
col==1){
                list.
setItemText("Mr.""Mrs.""Ms.""Dr.");
                list.
setItemCount(4);
            } else if(
col==5){
                list.
setItemText("Jr.""II""III""IV");
                list.
setItemCount(4);
            } else if(
col==6) {
                list.
setItemText("Bride""Groom""Both");
                list.
setItemCount(3);
            }
        
        list.
onItemClicked = function(eventi){
            var 
selectedText this.getItemText(i);
            
obj.setCellText(selectedTextcolrow);
            
obj.setCellValue(selectedTextcolrow);
            
obj.getCellTemplate(colrow).hidePopup();
        }
        
        return list;
        
    });
 
But again, all 3 lists are empty in FF and IE.
Jeremy Savoy
Monday, January 21, 2008
Ok, I found the problem ... very simple syntax error, did not enclose the setItemText list in [ ] :

This:
list.setItemText("Mr.""Mrs.""Ms.""Dr.");  Should be this:
list.setItemText([b][[/b]"Mr.""Mrs.""Ms.""Dr."[b]][/b]); 
Jeremy Savoy
Monday, January 21, 2008



This topic is archived.

Back to support forum

Forum search