:: Forum >>

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.Combo, 1);
    obj.setCellTemplate(new AW.Templates.Combo, 5);
    obj.setCellTemplate(new AW.Templates.Combo, 6);
    // Populate the list, set the onItemClicked to move selection to cell, then hide the list.
obj.setPopupTemplate(function(col, row){
        var list = new AW.UI.List;
                list.setItemText("Mr.", "Mrs.", "Ms.", "Dr.");
            } else if(col==5){
                list.setItemText("Jr.", "II", "III", "IV");
            } else if(col==6) {
                list.setItemText("Bride", "Groom", "Both");
        list.onItemClicked = function(event, i){
            var selectedText = this.getItemText(i);
            obj.setCellText(selectedText, col, row);
            obj.setCellValue(selectedText, col, row);
            obj.getCellTemplate(col, row).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 [ ] :

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