3.2.0

Changing data on editable cell breaks sorting when the Format for that column is AW.Formats.Number

Hi

I have found an issue with sorting.One of my column inside the grid is editable and having format as AW.Formats.Number.

Now I edit some cell in between and change the value.I do it for multiple cells (2 or 3 cells) now I click on the sort indicator.

The columns are not sorted in the proper order.

I am posting an example in which you can reproduce the scenario.
Please help us in this regard as this bug is critical for us.
Thanks
Vikramaditya Garg

<html>
<head>
<title>ActiveWidgets Examples</title>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>

var obj = new AW.UI.Grid;
obj.setCellText(function(i, j){return (j + i)});
obj.setHeaderText("header");

obj.setColumnCount(10);
obj.setRowCount(100);
var cellFormatter2 = new AW.Formats.Number;
obj.setCellFormat(cellFormatter2,0);
obj.setCellEditable(true);

document.write(obj);

document.write("<br>");

var label = new AW.UI.Label;
document.write(label);


// control activated/deactivated (receives/looses focus)

obj.onControlActivated = function(){
label.setControlText("Control activated");
}

obj.onControlDeactivated = function(){
label.setControlText("Control deactivated");
}

// editing starts/ends (F2, Enter, just start typing)

obj.onCellEditStarted = function(text, col, row){
label.setControlText("Edit started - text: " + text + ", col: " + col + ", row: " + row);
}

obj.onCellEditEnded = function(text, col, row){
label.setControlText("Edit ended - text: " + text + ", col: " + col + ", row: " + row);
}

// changing cell text

obj.onCellTextChanged = function(text, col, row){
label.setControlText("Cell text changed - text: " + text + ", col: " + col + ", row: " + row);
}

// validating (Enter)

obj.onCellValidating = function(text, col, row){
var value = Number(text);
/*
if (!(value > 100) || !(value < 1000)) {
label.setControlText("Invalid value - " + text + ", should be between 100 and 1000");
return true;
}*/
}

obj.onCellValidated = function(text, col, row){
label.setControlText("Cell validated - text: " + text + ", col: " + col + ", row: " + row);
}

</script>
</body>
</html>
Vikramaditya Garg
August 3,
Hi

The test data for this bug is 12 , 100, 10 in a column and then do sort.

Thanks
Vikramaditya Garg
Vikramaditya Garg
October 9,

This topic is archived.

See also:


Back to support forum