Opened 11 years ago

Closed 11 years ago

#6710 closed defect (invalid)

dojox.grid.data.Table sorts column with same values different upon each sort

Reported by: guest Owned by: sorvell
Priority: high Milestone:
Component: DojoX Grid Version: 1.0
Keywords: grid model data.Objects Cc: sschaer@…
Blocked By: Blocking:

Description

The default sort() implementation of dojox.grid.data.Table (or subclasses) does not behave consistent upon sorting a column that contains the same values.

Test case: Create a grid with eg. an Object model and an array of objects with attribute having the same value on a couple of the objects.

E.g.:

[
{"userName" : "admin1","portNumber":50000},
{"userName" : "admin2","portNumber":50000},
{"userName" : "admin3","portNumber":50000},
{"userName" : "admin4","portNumber":50000},
{"userName" : "admin5","portNumber":40000}
]

Sorting a grid with this data on the portNumber attribute will lead to a different order on the userName column in the grid every time the sort takes place. Somehow the sort() function doesnt behave consistent across multiple sorts. Sometimes the sorting results in eg:

admin1
admin2
admin3
admin4
admin5

sometimes it might result in eg:

admin3
admin5
admin1
admin2
admin4

I am not sure if this is fixable as the sort() can and should only take one column into account, but at least the desired behavior should be that sorting upon the portNumber column always results in the same order.

Change History (1)

comment:1 Changed 11 years ago by Bryan Forbes

Resolution: invalid
Status: newclosed

dojox.grid.data.Table doesn't exist anymore. Closing.

Note: See TracTickets for help on using tickets.