:: Forum >> Version 2 >>

how can I put combo boxes in a datagrid?

More information on this topic is available in the documentation section: /ui.combo/.

Does anyone have an example for this?
thanks!
Max
Tuesday, March 4, 2008
You should use AW.Templates.Combo for a cell template and AW.UI.List for a popup template -

var myData = [
    [
"cell1""cell2""cell3"],
    [
"cell1""cell2""cell3"],
    [
"cell1""cell2""cell3"]
];

var 
myItems = ["item11""item12""item13""item14"];

var list = new 
AW.UI.List;
list.
setItemText(myItems);
list.
setItemCount(4);

var 
obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setColumnCount(3);
obj.setRowCount(3);

obj.setCellTemplate(new AW.Templates.Combo1);
obj.setPopupTemplate(list, 1);

document.write(obj);
 
Alex (ActiveWidgets)
Wednesday, March 5, 2008

Post a reply:

Text:
Name:

Back to /ui.combo/

Documentation:

Forum search