0 Replies Latest reply on Jul 8, 2008 8:06 AM by pgherveou

    sorting & GroupingCollection

      Hello there

      I have a collection of object which 3 properties (prop1, prop2 and label).
      I use the first two properties as grouping fields and display the label in an advanced datagrid.

      Everything is working fine, but my problem is that I don't know how to sort manually the labels in the datagrid
      Even if I sort the first collection of object, labels are still not sorted when they are displayed in the hierarchical tree of the advanced datagrid

      here is the code I use :

      // define grouping collection and grouping object
      var groupingResourceCollection : GroupingCollection = new GroupingCollection();
      var grouping : Grouping = new Grouping();

      // set the source collection
      groupingResourceCollection.source = resourceCollection;

      // define the grouping fields
      grouping.fields = [new GroupingField("prop1"), new GroupingField("prop2")];
      groupingResourceCollection.grouping = grouping;