:: Forum >>

Sorting Broken In V2.0B3

It seems as though sorting number is broken in v2b3:

// Formats
var aw_format_number = new AW.Formats.Number;
grid.setCellFormat(aw_format_number, 1);
grid.setCellFormat(aw_format_number, 2);
grid.setCellFormat(aw_format_number, 3);
grid.setCellFormat(aw_format_number, 4);
grid.setCellFormat(aw_format_number, 5);
grid.setCellFormat(aw_format_number, 6);

The rendered grid still sorts numbers as strings i.e. 3400 104 45 sorts as 104,3400,45. Don't know if this is means anything, but the myData array has the numbers in quotes i.e. ["3400","104","45"];
Joe
Friday, December 30, 2005
In any language, including Javascript, information between quotes IS a string and will be treated as such. There is a way to declare a column as numberic in Aw but I have not tried it. Someone else will have to explain it or you can do a search of this forum and find the answer as this has been discussed many, many times before.
Jim Hunter
Friday, December 30, 2005
Jim,
My understanding is that the code above (setCellFormat) is there to set the sorting format, yet it doesn't seem to be working. I believe this is a bug. Alex?
Joe
Friday, December 30, 2005
Have you tried to remove the quotes from the data array to see if it then sorts correctly?
Jim Hunter
Monday, January 2, 2006
Should be working without quotes, I agree with Jim!
Michel
Tuesday, January 3, 2006
It appears as though this is a bug with AW2b3 in setCellFormat not working with a JS array data source.
Joe
Tuesday, January 3, 2006
Joe, you have not answered Jim's question, you are just pushing towards bug immediately without answers.

Have you tried to remove the quotes from the data array to see if it then sorts correctly?
Tony
Tuesday, January 3, 2006

This topic is archived.


Back to support forum

Forum search