Opened 13 years ago

Last modified 13 years ago

#6084 closed defect

Grid sorting fails when column contains null or missing data — at Version 3

Reported by: guest Owned by: Nathan Toone
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.0
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description (last modified by Nathan Toone)

If a model contains null data for a field for some rows, or the field is completely missing for some rows, sorting on a column based on that field in a dojox.Grid fails.

The Grid is re-ordered, but the rows with empty/missing values are not necessarily gathered at the beginning or end of the table, and the rows with valid data in that column are not sorted correctly either. Repeated sorts can produce different results.

Found using a model in Dojo 1.0.2 on IE6. the nulls in my actaul application come from the JSON data source (and originally from an Oracle database.

Empty strings do sort correctly, as do strings containing a single   charcter, so my workaround is obviously to ensure that nulls are converted to proper strings before assigning the model.

Simon Yates

Change History (4)

Changed 13 years ago by guest

Attachment: gridSort.html added

Simple example demonstrating sorting problems with nulls in columns

comment:1 Changed 13 years ago by bill

Milestone: 1.2

comment:2 Changed 13 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

comment:3 Changed 13 years ago by Nathan Toone

Description: modified (diff)
Owner: changed from Bryan Forbes to Nathan Toone
Status: newassigned
Note: See TracTickets for help on using tickets.