Opened 11 years ago

Closed 11 years ago

#6084 closed defect (worksforme)

Grid sorting fails when column contains null or missing data

Reported by: guest Owned by: Nathan Toone
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.0
Keywords: Cc: yatessc@…
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 dojox.grid.data.Objects 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

Attachments (1)

gridSort.html (2.2 KB) - added by guest 11 years ago.
Simple example demonstrating sorting problems with nulls in columns

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by guest

Attachment: gridSort.html added

Simple example demonstrating sorting problems with nulls in columns

comment:1 Changed 11 years ago by bill

Milestone: 1.2

comment:2 Changed 11 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

comment:3 Changed 11 years ago by Nathan Toone

Description: modified (diff)
Owner: changed from Bryan Forbes to Nathan Toone
Status: newassigned

comment:4 Changed 11 years ago by Nathan Toone

Resolution: worksforme
Status: assignedclosed

No longer an issue with the DataGrid?. Reopen with an updated test case if you see further issues.

Note: See TracTickets for help on using tickets.