3.0 beta 2

Stuck with many Combos or Lists inside a grid (Combos having all the same value, Lists not showing)

Hello,

I'm having many problems with combos inside a grid.

Here's my code:

var lst2 = new AW.UI.Combo;
lst2.setItemText(["Por Enviar","Rechazado"]);
lst2.setItemValue(["0","2"]);
lst2.setItemCount(2);
lst2.getContent("box/text").setAttribute("readonly",true);
lst2.onControlActivated = function(){ return true; } 
lst2.setControlText('Seleccione');
lst2.onCurrentItemChanged = function(i){ Validacion(i,this);}

for(var i=0; i<AWGDetalle_awg.getRowCount(); i++){
  AWGDetalle_awg.setCellTemplate(lst2,27,i);
  [combo-unrelated code]
}


So far, so good. The combos behave good until I have to sweep the grid again to obtain the value of each combo:

for(var i=0; i<AWGDetalle_awg.getRowCount(); i++){
  var comboEdo = AWGDetalle_awg.getCellTemplate(27, i);
  comboEdo.getItemValue(comboEdo.getSelectedItems());
}


In which case, the combos all have the SAME VALUE (the one of the last combo, to be precise).

Figuiring if that might be because I use AW.UI.Combo instead of AW.Templates.Combo, I tried changing to this:

var tmpL = new AW.Templates.Combo;
var lst2 = new AW.UI.List;
lst2.setItemText(["Por Enviar","Rechazado"]);
lst2.setItemValue(["0","2"]);
lst2.setItemCount(2);
lst2.setControlText('Seleccione');
lst2.onCurrentItemChanged = function(i){ Validacion(i,this);}

for(var i=0; i<AWGDetalle_awg.getRowCount(); i++){
   AWGDetalle_awg.setCellTemplate(tmpL,27,i);
   AWGDetalle_awg.setPopupTemplate(lst2,27,i)
  [combo-unrelated code]
}



...but now the popup won't show when the control's clicked!!!

Seriously, this is driving me crazy. What am I missing or doing wrong?

Any ideas will be most appreciated.


Best Regards, Toño
Tonio
March 24,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.