3.2.0

onCellSelectedChanging call order changed

Hi Alex,

I was just modifying some code I had written earlier to work with 2.5.1 and came across a peculiarity with onCellSelectedChanging.
It looks like the order in which it is called has changed between 2.0.2 and 2.5.1

For the code given below, in 2.0.2, the from alert is generated first and then the to alert.
However, in 2.5.1, the to alert is generated first and then the from alert.
Is this intentional ?
Because I felt the from alert should occur before the to alert.
Anyway, its not a problem to code around it :-)

<html>
<head>
    <script src="runtime/lib/aw.js"></script>
    <link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText("header");

obj.setFixedLeft(0);

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

obj.setCellEditable(false);

obj.onCellSelectedChanging = function(toCell, col, row) {

    if (toCell) {
        alert("to row " + row + " col " + col);
    } else {
        alert("from row " + row + " col " + col);
    }

}

document.write(obj);
</script>
</body>
</html>
Ankur Motreja
February 16,

This topic is archived.

See also:


Back to support forum