Combo box value 'v' text in a grid, shows value initially


I've got a combo in a grid column using the template. Edits, popup closing, keeping old value etc. all working. However on initial load the combo shows the "value" rather than the "text", on edits the "value" is set correctly and "text" is displayed correctly.

How do I get the grid to show the "text" on the intial load of the grid. I'm using a CSV source through the table object, i.e. obj.setCellModel(table).


var mycombo=new AW.Templates.Combo;
        mycombo.setStyle("border","1px solid #999999"); mycombo.setStyle("margin","0px"); mycombo.setStyle("padding","0px");
        obj.setPopupTemplate(function(col, row){ // PopUp Code
            var grid = this; var list = new AW.UI.List; list.setId("mylist");
            list.setItemValue(<% =values_clients %>); list.setItemText(<% =text_clienttids %>); list.setItemCount(<% =numclients %>); 
            list.onItemClicked = function(event, i){
                var text = this.getItemText(i); //Must set text first to fire text onCellTextChanged event.
                grid.setCellText(text,col,row); grid.setCellValue(this.getItemValue(i),col,row);
            return list;  

As always thanks for any help,

Cheers, Charles.
Charles Dean
October 10,
Just to add to the question - how would I dynamically set the text/value later - e.g. trying to implement an "undo" process. Thanks.

e.g. obj.setCellValue(oldvalue,column,row) doesn't do anything :)
Charles Dean
October 10,

This topic is archived.

See also:

Back to support forum