sort problem with equal values
The 2nd column in the following grid does not sort correctly in IE, I think because of a bug in AW.Grid.Controllers.Sort.
The sort problem can be fixed by calling obj.setCellFormat(number, 1). But I think the real fix is to AW.Grid.Controllers.Sort, below:
<script>
var obj = new AW.UI.Grid;
var rowdata = [
[3, 2],
[2, 1],
[1, 2]
];
obj.setRowCount(3);
obj.setColumnCount(2);
obj.setCellText(function(col,row){return "value[" + row + ","
+ col + "]=" + rowdata[row][col];});
obj.setCellValue(function(col,row){return rowdata[row][col];});
document.write(obj);
</script>
The sort problem can be fixed by calling obj.setCellFormat(number, 1). But I think the real fix is to AW.Grid.Controllers.Sort, below:
else if ("".localeCompare) {
return function(i, j){
try {
var a = values[i], b = values[j], x, y;
if (typeof(a) != typeof(b)){
x = types[typeof(a)];
y = types[typeof(b)];
if (x > y) {return greater}
if (x < y) {return less}
} else if (typeof(a)=="number"){
if (a > b) {return greater}
if (a < b) {return less}
// Next line is new !!
return equal(i,j);
} else ...
CK
April 11,