Navigating to the parent directory on a FileSystemDataGrid control in Adobe AIR

by Peter deHaan on December 19, 2008 · 1 comment

in FileSystemDataGrid

The following example shows how you can navigate to the parent directory in an Adobe AIR FileSystemDataGrid control by calling the navigateUp() method.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!--  -->
<mx:WindowedApplication name="FileSystemDataGrid_navigateUp_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">
 
    <mx:Script>
        <![CDATA[
            import mx.events.FileEvent;
 
            private function btn_click(evt:MouseEvent):void {
                dataGrid.navigateUp();
            }
 
            private function dataGrid_directoryChange(evt:FileEvent):void {
                application.status = evt.file.nativePath;
            }
        ]]>
    </mx:Script>
 
    <mx:ApplicationControlBar dock="true">
        <mx:Button id="btn"
                label="navigateUp()"
                click="btn_click(event);" />
    </mx:ApplicationControlBar>
 
    <mx:FileSystemDataGrid id="dataGrid"
            directoryChange="dataGrid_directoryChange(event);"
            width="100%"
            height="100%" />
 
</mx:WindowedApplication>

{ 1 comment… read it below or add one }

1 Issac Cornelius 02.15.09 at 12:45 am

Dear Sir,
As for long I have never been had a adobe parents during my childhood till now.However,today I am looking for a adobe parents in order to be a child of your family and to be a greatest relationship among us.I am very please if you take me as a part of your family member.
Thank you…
Your Sincerely,
Issac Cornelius.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: