3.0.4

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
December 30,
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
December 30,
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
December 30,
Have you tried to remove the quotes from the data array to see if it then sorts correctly?
Jim Hunter
January 2,
Should be working without quotes, I agree with Jim!
Michel
January 3,
It appears as though this is a bug with AW2b3 in setCellFormat not working with a JS array data source.
Joe
January 3,
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
January 3,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.