Skip navigation
hezjing
Currently Being Moderated

Sort by multiple columns in Spark DataGrid

Aug 24, 2011 12:58 AM

Hi

 

I'm using Flex 4.5.

 

May I know how to sort the rows by multiple columns in Spark DataGrid control? For example, sort the rows by column A and B (in ascending order) and then column C (in descending order)?

 
Replies
  • Currently Being Moderated
    Aug 24, 2011 2:49 AM   in reply to hezjing

    Hi,

     

      In flex 4.5 , for spark datagrid in gridColumn tag there is property

    sortDescending.

             For column which you want rows should be in descending order make sortDescending="true" and for other gridcolumn for ascending sorting make sortDescending="false".

     

    Thanks.

    Appi

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2011 9:29 AM   in reply to 123appi

    Spark DataGrid only supports interactively sorting one column (user clicks on the column header). However, you can sort multiple columns by calling  "sortByColumns()" on DataGrid. As Appi said, you'll need to first configure your columns to have the correct sortDescending value.

     

    -Kevin

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2013 2:50 PM   in reply to hezjing
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points