Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    sort ascend and descend inconsistent?

    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"
    }
    
    ]

    #2
    One of our Engineers is assigned to take a look, we'll let you know as soon as we have more information

    Thanks
    Isomorphic Software

    Comment


      #3
      The case you mention should be working now in SC 8.3d/SGWT 3.1d; the next nightly will have it.

      Comment


        #4
        I forget to mention each time because I assume everyone working in SC knows (sorry)- we are still working with 8.2p

        Comment


          #5
          The fix has been ported to SC 8.2d/SGWT 3.0d.

          Comment

          Working...
          X