Announcement

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

    sorting children in a TreeGrid

    I have a TreeGrid that mimics a discussion tree. The top level elements of the tree are discussion topics. Each topic can have one or more child text elements (it is just a 2-level tree). The dataSource for both topics and children has three fields (text, dateCreated, author).

    I want to enforce a sort order by dateCreated so I use dateCreated as the sort field for the tree. The top level topics to get sorted properly but the child annotations appear in random order. Is this an intended behavior in TreeGrid and if so what would be the best way for me to enforce the child sort order by date?

    thanks,
    pf

    #2
    Not an intended behavior - if you try sorting the trees in the samples you can see the sort you're expecting. What might be happening is that your date values are strings, not Date instances. That could produce a random ordering for leaves and perhaps there are a few enough nodes that it just happened to sort correctly as a string there.

    Comment

    Working...
    X