• Home
  • About Me
  • AIR Central
  • AS3 Libs
  • Books
  • Flex Central
  • Resources
  • The Guru's
  •  

    sortCompareFuction

    The sortCompareFuction is used to add a custom sort to grid data that either fails to sort because of case issues or has a labelFormatter in place which causes the sort to fail. In either case the solution is to add a sortCompareFunction to your application. The example shown in this post demonstrates how the built in sort fails when the first letter of the last name is lower case while all of the rest are upper case. Try sorting the two last name columns and observer how the results are different. The last column has a sortCompareFunction attached which does a compare after converting the last name to upper case. You can use this function when you have formatted data and need it to sort properly as well.

    Right Click on application to view & download Source Code.

    Run This Code

    Rich

    Leave a Reply