3.2.0

Combo box help!

I can get the combo box to display but I can't get it to show the value that you select. What did I do wrong? How do I make the grid know that once you select a value there has been an edit?

var combo = new AW.Templates.Combo;
gridObj.setCellTemplate(combo, 4);
gridObj.setPopupTemplate(function(col, row) {
var grid = this;
var list = new AW.UI.List;

list.setItemText(["All","AB","AK"]);
list.setItemCount(3);

list.onItemClicked = function(event, i){
var text = this.getItemText(i);
grid.setCellText(text, col, row);
grid.setCellValue(text, col, row);
grid.getCellTemplate(col, row).hidePopup();
}
return list;
});
AS
November 27,
I got the combo box to select the correct value, but once it does you cannot edit anything else in the grid. Why does this happen?

var combo = new AW.Templates.Combo;
gridObj.setCellTemplate(combo, 4);
gridObj.setPopupTemplate(function(col, row) {
var list = new AW.UI.List;

list.setItemText(["All","AB","AK"]);

list.setItemCount(3);

list.onItemClicked = function(event, i){
var text = this.getItemText(i);
gridObj.setCellText(text, col, row);
gridObj.setCellValue(text, col, row);

list.setItemText(text);
gridObj.getCellTemplate(col, row).hidePopup();
gridObj.setCellText("U", 0, row);
updatedDataArray[row] = 'Y';
gridObj.refresh();
}

return list;
});
AS
November 28,
list.onItemClicked event handler is not necessary - combo template includes a default one, which updates the cell text.

var data1 = ["Email","Phone","FedEX","USPS"];

var list1 = new AW.UI.List;
list1.setItemText(data1);
list1.setItemCount(data1.length);

var obj = new AW.UI.Grid;

obj.setCellData("cell");
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(10);

obj.setCellEditable(true);

obj.setCellTemplate(new AW.Templates.Combo, 1);

obj.setPopupTemplate(list1, 1);

document.write(obj);
Alex (ActiveWidgets)
November 28,
and if i just want a combo on the second row, can i desactivate, disable the others, or just simply put a combo on the second row and have the rest of the others with no combo ???

hope to ear from you soon ...


but thanks in advance anyway
Nuno Silva
January 24,
Hi,

I want to know if inserting COmbo boxes is available in ActiveWidgets 1.x, or is it available from ActiveWidgets 2.0?
CUK
May 1,

This topic is archived.

See also:


Back to support forum