3.0.0

combo in grid on double click in 2.5.1

Hi Alex,

The following code used to show a combo box in the grid on double click.
Now, it does not seem to work.
It shows the combo box in column 1, row 1.
However, when double clicking on any other cell, is doesn't display a combo

<html>
<head>
    <script src="runtime/lib/aw.js"></script>
    <link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
    <style>
.aw-grid-control .aw-ui-input,
.aw-grid-control .aw-ui-combo {
    -moz-user-select: text;
}
    </style>
</head>
<body>
<script>
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText("header");

obj.setColumnCount(10);
obj.setRowCount(100);

obj.setCellEditable(false);

editList = new AW.UI.List;

data1 = ["abcd", "pqrs", "xyz"];

editList.setItemText(data1);
editList.setItemCount(data1.length); 
editList.setSize(100,60);

obj.onCellDoubleClicked = function(event, col, row){

    obj.setCellTemplate(new AW.Templates.Combo, col, row);
    obj.setPopupTemplate(editList, col, row);

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

}

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

document.write(obj);
</script>
</body>
</html>
Ankur Motreja
January 31,
Hi,

Just figured out that it works if I use obj.getRowTemplate(row).refresh() instead of obj.getCellTemplate(col, row).refresh().
So, maybe its a bug in getCellTemplate() ?

Regards,
Ankur
Ankur Motreja
January 31,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.