:: Forum >>

sorting bug

It seems that the third column in this example is not sorting. This is the 2.0 release.

var obj = new AW.UI.Grid;
var data = [
[1,"1",1],
[2,"1",1],
[3,"2",2]
];
obj.setCellData(data);
obj.setRowCount(3);
obj.setColumnCount(3);
document.write(obj);

Seems to happen with numeric columns in which there are duplicate values.
DT
Friday, July 7, 2006
u need set the format for cell
obj.setCellFormat(AW.Formats.Number, 3);
Paulo Cesar Silva Reis (PC from Brazil).
Friday, July 7, 2006
Yes, this is a bug in AW 2.0.1 - sorting equal numbers breaks when the format is not specified. The workaround is to set numeric format for this column -

var obj = new AW.UI.Grid;
var data = [
    [1,"1",1],
    [2,"1",1],
    [3,"2",2]
];

obj.setCellData(data);

var num = new AW.Formats.Number;
obj.setCellFormat(num, 2);

obj.setRowCount(3);
obj.setColumnCount(3);

document.write(obj);



Alex (ActiveWidgets)
Sunday, July 9, 2006
in this example is not sorting. This is the 2.0 release.

var obj = new AW.UI.Grid;
var data = [
[390,00],
[260,00],
[85,80],
[44,20],
[162.461,65],
[158.103,14],
[144.712,15],
[84,428,51],
[77,261,16]
];

obj.setCellFormat([number]);

document.write(obj);





Newton - From Brasil
Friday, January 26, 2007

This topic is archived.


Back to support forum

Forum search