Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#10218 closed defect (invalid)

EnhancedGrid Globalization - Problems when sorting columns of numbers or amounts

Reported by: Roberto Mosqueda Owned by: evan
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.4.0b
Keywords: EnhancedGrid g11y Cc: David Schwartz, [email protected]…, Nathan Toone, [email protected]…, Adam Peller
Blocked By: Blocking:


Testing Type: Globalization

Browsers Affected: IE 6,7 and 8, Firefox 3.0 and 3.5, Safari 4, Chrome

Problem Description: The sorting function is done in base on the unicode value of the numbers instead of the numeric value that represents the complete number.

Steps to Reproduce:

1.- Open the browser
2.- Have a column with some amounts on the enhanced grid table
3.- Go to /test_enhanced_grid.html
4.- Click on the single sort button on the column header

Actual Result : See image1.gif to see the sorted column.

Expected Result: The sort must be done in base on the value of the number not the unicode value of the characters.

Attachments (1)

image1.gif (43.7 KB) - added by Roberto Mosqueda 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Roberto Mosqueda

Attachment: image1.gif added

comment:1 Changed 12 years ago by Nathan Toone

Keywords: EnhancedGrid added; Datagrid removed
Owner: changed from Nathan Toone to Evan

comment:2 Changed 12 years ago by Adam Peller

Resolution: invalid
Status: newclosed

I'm going to say this is working as designed. It's sorting the cells alphabetically (reverse alphabetically here?) since there's no way to know that these are numbers or currencies. Also, as far as I know, nothing here is unique to the EnhancedGrid?.

This may not be documented well, but a proper way to do this is in the test case at dojox/grid/tests/test_edit_dijit.html using Dijits to do currency formatting based on plain number values, which are sorted correctly. You can just set up formatters without the dijits also.

comment:3 Changed 11 years ago by bill

Owner: changed from Evan to evan
Note: See TracTickets for help on using tickets.