1 Reply Latest reply on Jul 28, 2009 9:57 AM by Gregory Lafrance

    How to display data from local csv files (in a folder on my desktop) in my flex air application using a datagrid?

    Dayana713

      Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
         
          <mx:Label x="280" y="19" text="1. Select Purchase Order"/>
          <mx:List y="45" width="232" horizontalCenter="0"></mx:List>
         
          <mx:Label x="158" y="242" text="2. Verify Information"/>
          <mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
              <mx:columns>
                  <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
                  <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                  <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
              </mx:columns>
          </mx:DataGrid>
         
          <mx:Label x="355" y="606" text="3. Generated PDF"/>
          <mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
         
      </mx:WindowedApplication>