3.2.0

obj.getCellTemplate(col,row).hidePopup();

i have trouble with line

obj.getCellTemplate(col,row).hidePopup();

dont close in firefox popup have list items



<script>
var myData = [
["campo1","texto","texto","100","true","left","black","black","false","11"],
["campo2","texto","texto","100","true","left","black","black","false","11"],
["campo3","texto","texto","100","true","left","black","black","false","11"],
["campo4","texto","texto","100","true","left","black","black","false","11"],
["campo5","texto","texto","100","true","left","black","black","false","11"],
["campo6","texto","texto","100","true","left","black","black","false","11"]
];
/*Listado de Datos*/
var oldRow=-1;
var oldCol=-1;
var list = new AW.UI.List;
list.setStyle("font-size","12px");
list.setStyle("font-family","sans-serif");
var myItems = [
["true","false"],
["left","right","center"],
["black","red","yellow"],
];
/*Config Grila*/
var myGridcfg = new AW.UI.Grid;
var texto = new AW.Formats.String;
var numeric = new AW.Formats.Number;
myGridcfg.setCellData(myData);
myGridcfg.setColumnWidth("200,80,80,50,50,70,70,70,70,82".split(","));
myGridcfg.setCellFormat([texto,texto,texto,numeric,texto,texto,texto,texto,texto,numeric])
myGridcfg.setHeaderText(["Campos","Tipo","Formato","Ancho","Visible","Alineacion","Color fuente","Color fondo","Negrita","Tamaño letra"]);
myGridcfg.setRowCount(6);
myGridcfg.setColumnCount(10);
myGridcfg.setCellEditable(true,2);
myGridcfg.setCellEditable(true,3);
myGridcfg.setCellEditable(true,9);
/*Configuracion de los combos para las columnas*/
myGridcfg.setCellTemplate(new AW.Templates.Combo, 4);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 5);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 6);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 7);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 8);
myGridcfg.setPopupTemplate(
function(col, row){
var grid = this;
var list = new AW.UI.List;
var vecItem = new Array();
/*validacion para el bug de doble listado desplegado*/
window.status="oldRow:"+oldRow+" ---- oldCol:"+oldCol;
if(oldRow==-1){ oldRow=row; oldCol=col;
}else{
window.status+=" ******OLD col:"+col+" ---- row:"+row;
grid.getCellTemplate(oldCol,oldRow).hidePopup();
if((oldRow==row)&&(oldCol==col)){ oldRow=-1; }else{ oldRow=row; oldCol=col; };
};
if((col==4)||(col==8)){vecItem = myItems[0];
}else if(col==5){vecItem = myItems[1];
}else if((col==6)||(col==7)){vecItem = myItems[2];};
list.setItemText(vecItem);
list.setItemCount(vecItem.length);
if(vecItem.length<10){ lon=19*vecItem.length; }else{ lon=180; };
if(vecItem.length==0){ lon=5; }
list.setControlSize(grid.getColumnWidth(col),lon);
list.onItemClicked = function(event,i){
var selectedText = this.getItemText(i);
grid.setCellData(selectedText,col,row);
grid.setCellText(selectedText, col, row);
grid.setCellValue(selectedText, col, row);
grid.getCellTemplate(col,row).hidePopup();
oldRow=-1;
};
return list;
}
);
document.write(myGridcfg);
</script
Javier
February 10,
i click one list and click other later without select one item first list in ff dont close popup


i test with this one too



<script>
var myData = [
["campo1","texto","texto","100","true","left","black","black","false","11"],
["campo2","texto","texto","100","true","left","black","black","false","11"],
["campo3","texto","texto","100","true","left","black","black","false","11"],
["campo4","texto","texto","100","true","left","black","black","false","11"],
["campo5","texto","texto","100","true","left","black","black","false","11"],
["campo6","texto","texto","100","true","left","black","black","false","11"]
];
/*Listado de Datos*/
var oldRow=-1; /* oldRow y oldCol son variables para corregir un bug de los listados sobre los combos*/
var oldCol=-1;
var list = new AW.UI.List;
list.setItemText(itemText);
list.setItemCount(itemCount);
var myItems = [
[],
[],
[],
[],
["true","false"],
["left","right","center"],
["black","red","yellow"],
["black","red","yellow"],
["true","false"]
];
function itemText(i){
var col = this.$0;
var row = this.$1;
return myItems[col][i];
};
function itemCount(){
var col = this.$0;
var row = this.$1;
return myItems[col].length;
};
/*Config Grila*/
var myGridcfg = new AW.UI.Grid;
var texto = new AW.Formats.String;
var numeric = new AW.Formats.Number;
myGridcfg.setCellData(myData);
myGridcfg.setColumnWidth("200,80,80,50,50,70,70,70,70,82".split(","));
myGridcfg.setCellFormat([texto,texto,texto,numeric,texto,texto,texto,texto,texto,numeric])
myGridcfg.setHeaderText(["Campos","Tipo","Formato","Ancho","Visible","Alineacion","Color fuente","Color fondo","Negrita","Tamaño letra"]);
myGridcfg.setRowCount(6);
myGridcfg.setColumnCount(10);
myGridcfg.setCellEditable(true,2);
myGridcfg.setCellEditable(true,3);
myGridcfg.setCellEditable(true,9);
/*Configuracion de los combos para las columnas*/
myGridcfg.setCellTemplate(new AW.Templates.Combo, 4);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 5);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 6);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 7);
myGridcfg.setCellTemplate(new AW.Templates.Combo, 8);
myGridcfg.setPopupTemplate(list,4);
myGridcfg.setPopupTemplate(list,5);
myGridcfg.setPopupTemplate(list,6);
myGridcfg.setPopupTemplate(list,7);
myGridcfg.setPopupTemplate(list,8);
document.write(myGridcfg);
</script>
Javier
February 10,
i have 2.5.3 license version

alex can u help me please
Javier
February 10,
obj.getCellTemplate(col,row).hidePopup(); dont wotk in 2.5.3 i test aw 2.0.2 me old version and work fine
Javier
February 11,

This topic is archived.

See also:


Back to support forum