6 Replies Latest reply on May 8, 2009 8:51 AM by phillipus_rex

    Displaying the Sort Arrow of a DataGrid Column - Without User Clicking

    phillipus_rex

      I have a function that puts the sort arrow on the column of a datagrid without having to click the column:

       

       private function init():void {
                      arrColl.sort = new Sort();
                      arrColl.sort.fields = [new SortField("idx", false, true)];
                      arrColl.refresh();
                  }
      

       

       

      However, this only works when applying it to the creationComplete() function of the datagrid itself.

       

       

      I have a collection of buttons that will each populate the datagrid with new data, and I need to make this function display the sort arrow for the first column without the user having to click the column first.

       

       

      Any ideas on how to accomplish this?

       

      Thanks.