1 Reply Latest reply on Jul 12, 2010 8:39 PM by aktell2007

    Changing the row sequent settings of a Data grid ....

    aktell2007 Level 1

      Changing the row sequent settings of a Data grid from (A to Z or 1 to 100) into (Z to A or 100 to 1).

      It is possible manually selecting the header arrow, but maybe somebody knows to do this programmatically as a basic property setting or in AS 3.

       

      Thanks in advance aktell2007

        • 1. Re: Changing the row sequent settings of a Data grid ....
          aktell2007 Level 1

          If anybody is interested:

           

          <mx:Script>
               <![CDATA[
                    import mx.collections.Sort;
                    import mx.collections.SortField;
                    import mx.collections.ArrayCollection;
          
                    private function sortingDg():void {
          
                         var dataSortFieldOne:SortField = new SortField;
                         
                         dataSortFieldOne.name = "myData";
                         dataSortFieldOne.numeric = true;
                         
                         var numericDataSortOne:Sort = new Sort();
                         
                         numericDataSortOne.fields = [dataSortFieldOne];
                         
                         arrColl.sort = numericDataSortOne;
                         arrColl.refresh();
                    }
               ]]>
          </mx:Script>