The following example shows how you can do a date sort on the Flex FileSystemDataGrid control in Adobe AIR by setting a custom sort compare function on the creationDateColumn and modificationDateColumn objects. <?xml version="1.0" encoding="utf-8"?> <!-- http://airexamples.com/2010/03/10/sorting-the-filesystemdatagrid-control-by-date-in-adobe-air/ --> <mx:WindowedApplication name="FileSystemDataGrid_creationDateColumn_sortCompareFunction_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" width="600" minHeight="400"> <mx:Script> <![CDATA[ import mx.utils.ObjectUtil; private function init():void […]
↧