Run the following testcase and sort by continent ascending. When sorted ascending, a row with continent = null is the very first on the list. Now sort by continent descending. At this point I would expect the continent = null to be the last row but instead continent = "" is the last row. Is this intended behaviour?
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:224, alternateRecordStyles:true, data: countryData, fields:[ {name:"continent"}, {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"}, {name:"countryName", title:"Country"}, {name:"population", title:"Population", formatCellValue:"isc.Format.toUSString(value)"}, {name:"area", title:"Area (km²)", formatCellValue:"isc.Format.toUSString(value)"} ], // initial sort on Population, high-to-low sortFieldNum: 2, sortDirection: "descending" }) countryData = [ { continent:null, countryName:"United States", countryCode:"US", area:9631420, population:298444215, gdp:12360.0, independence:new Date(1776,6,4), government:"federal republic", government_desc:2, capital:"Washington, DC", member_g8:true, article:"http://en.wikipedia.org/wiki/United_states" }, { continent:"", countryName:"China", countryCode:"CH", area:9596960, population:1313973713, gdp:8859.0, government:"Communist state", government_desc:0, capital:"Beijing", member_g8:false, article:"http://en.wikipedia.org/wiki/China" }, { continent:"Asia", countryName:"Japan", countryCode:"JA", area:377835, population:127463611, gdp:4018.0, government:"constitutional monarchy with parliamentary government", government_desc:1, capital:"Tokyo", member_g8:true, article:"http://en.wikipedia.org/wiki/Japan" } ]
Comment