3.2.0

Create morethan one dropdown

Hi guys, i am new in active widgets. i am using AW grid with combo box in each and every row in the last column.my problem aw let not allow me to create dynamic combo.i want combo should have separate name and object for every row. below here i snipped my coding, plz do the needful things.

coding
=====
for(var icount=0;icount<myCells.length;icount++)
{
var comboFxDes = "comboFxDes"+icount
comboFxDes = new AW.UI.Combo;
comboFxDes.setControlText("");
comboFxDes.getContent('box/text').setAttribute('readonly', true);
comboFxDes.setItemCount(FX_Desc.length);
comboFxDes.setItemText(RemoveDuplicates(FX_Desc));
comboFxDes.onControlEditStarted = function()
{
this.getContent("box/text").element().contentEditable = false;
}
grid.setCellTemplate(comboFxDes,2,icount);
}

the above coding not allow me to create dropdowns with different object
Sabi
August 29,
Mine looked something like this where the first loop is how many combo's you want(i had 5) i saw people using combo lists and it seemed to work better for me.

for(var c=0;c <5;c++){
        comboList = "All " + myHeaders[c] + "s";
        for(var x=0;x<myCells.length;x++){
            if(!comboList.match(myCells[x][c]) && c < 4){
                comboList = comboList + ',' + myCells[x][c];
            }
            if(!comboList.match(myCells[x][c].substr(0,2)) && c == 4){
                comboList = comboList + ',' + myCells[x][c].substr(0,10);
            }
        }
                
        comboList = comboList.split(',');
        var template = new AW.UI.Combo;
        template.getPopupTemplate(c).setStyle("height", comboList.length*24);
        template.setItemText(comboList);
        template.setControlText("All " + myHeaders[c] + "s");
        template.setItemCount(comboList.length);
        template.getContent('box/text').setAttribute('readonly', true);
        
        template.onControlEditStarted = function(){
            this.getContent("box/text").element().contentEditable = false; this.showPopup(); 
        }; }
Ryan Garabedian
August 29,
ignore those first if statements that was used for filtering
Ryan Garabedian
August 29,
Hi thnks for ur kindly response. i havebeen found in someway
sabi
September 4,

This topic is archived.

See also:


Back to support forum