I think the override may be the only solution...a compare function in
this case wouldn't work because the names of the groups can be literally
anything, I only used "Group 1", etc for illustration purposes. Any
ideas on where in the groupingCollection class the reordering is happening?
Adrian
Matt Chotin wrote:
You could override how the grouping class does the actual grouping.
Maybe by overriding the refresh() method of GroupingCollection?
It uses sorting for efficiency in putting things together. You could
also write a custom compareFunction that knew everything would be
titled Group XX and just did a numeric compare on the XX portion?
Matt
On 9/24/08 7:38 AM, "Adrian Williams" <[EMAIL PROTECTED]
<mailto:adrianw%40familytreedna.com>> wrote:
All,
I discovered a frustrating feature of the ADG when using
groupings...the ADG automatically sorts the displayed data by the
field you are grouping on. I really, really need the ability to
disable this as I am incorporating a displayOrder option for my users
to define what order they want the groupings to appear in. The data is
coming from my webservice based on the displayOrder but once it gets
populated in my ADG, it's re-ordered by the grouping.
So for example, I have 10 groups....named Group 1 through Group 10.
And each of the groups displayOrder is set to the same as the
name...so the displayOrder for Group 1 == 1, Group 2 == 2, ... , Group
10 == 10. But when the ADG is rendered, it sorts them by the group
names, which are strings, and puts them out of the expected order...I
get Group 1, Group 10, Group 2, etc.
This is a critical aspect for us and I really hope to find a solution
to this.
Best,
Adrian