1 Reply Latest reply on Sep 30, 2010 2:07 PM by Flex harUI

    Datagrid issue

    Gene Godsey Level 1

      I am populting a data grid with a simple xml file.

      The datagrid only displays the first record with all of the xml data as comma delimited in the first record of the data grid.


      What am I doing wrong here.


      here is the app code.


      <?xml version="1.0" encoding="utf-8"?>
      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:mx="library://ns.adobe.com/flex/halo" width="760" height="398" xmlns:mx1="library://ns.adobe.com/flex/mx"  xmlns:functiondatadisplay="services.functiondatadisplay.*">
                  import mx.controls.Alert;
                  import mx.events.FlexEvent;
                  protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                      getDataResult.token = functionDataDisplay.getData();
              <s:CallResponder id="getDataResult"/>
              <functiondatadisplay:FunctionDataDisplay id="functionDataDisplay" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>


          <s:Label x="0" y="0" text="Operating Procedures" fontWeight="bold" fontSize="15" textDecoration="underline"/>
          <s:Label x="0" y="23" text="DAGR KEY PAD" fontStyle="italic" fontWeight="bold"/>
          <mx1:VRule x="392" y="0" height="100%"/>
          <s:RichText x="402" y="17" text="*     The DAGR obtains current position by simply turning the DAGR on with an open view of the sky." width="45%" fontStyle="italic" fontWeight="bold"/>
          <s:Label x="408" y="0" text="POWER ON" fontSize="15" fontWeight="bold" textDecoration="underline"/>
          <s:Label x="409" y="187" text="POWER OFF" fontSize="15" fontWeight="bold" textDecoration="underline"/>
          <s:Label x="400" y="274" text="DISPLAY LIGHTING" fontSize="15" fontWeight="bold" textDecoration="underline"/>
          <s:TextArea x="10" y="40" width="374" editable="true" fontSize="13">
              <s:text><![CDATA[*     All of the keys on the DAGR keypad are duel function (primary/secondary) except for the cursor (arrow) keys. Each duel function key is labeled with two sets of letters. All primary function keys are labeled with large letters and all secondary functions are labeled with smaller letters. Push and release to activate the primary function of the key. Push and hold (for 2 seconds) to activate the secondary function of the key. Use cursor keys to scroll up and down as well as left and right within pages. Press and release the QUIT/PWR key and POS/PAGE key to advance from one page to another.]]></s:text>


          <s:TextArea x="402" y="45" width="337" text="a)     Push and release the PWR/QUIT key to turn the DAGR on." fontSize="13" height="38"/>
          <s:TextArea x="402" y="87" width="337" text="b)     The POWER ON STATUS message is displayed for two seconds (If a CV Key, GUV key, SV code, internal compass condition exist, acknowledge message accordingly), then the SV Sky View Page is automatically displayed if the following are true. (1) Self-test has passed; (2) DAGR does not need initialization." fontSize="13" height="38" editable="false" enabled="true"/>
          <s:TextArea x="402" y="125" width="337" fontSize="13" height="58" text="c)     From the SV Sky View page, the DAGR automatically displays the present position page after acquiring the current position. "/>
          <s:TextArea x="402" y="202" width="337" fontSize="13" height="24" text="a)     Push and hold PWR/QUIT key for 2 seconds."/>
          <s:TextArea x="402" y="228" width="337" fontSize="13" height="41" text="b)     DAGR displays WARNING acknowledge as necessary"/>
          <s:TextArea x="402" y="293" width="337" fontSize="13" height="53" text="a)     If keypad/Display lighting is required, turn display light on/off by pushing and holding the BRIGHTNESS/MENY key."/>
          <s:TextArea x="402" y="351" width="337" fontSize="13" height="37" text="b)     Display lighting on/off status can be verified by observing the display lighting status indicator."/>
          <mx1:DataGrid x="10" y="211" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getDataResult.lastResult}">
                  <mx1:DataGridColumn headerText="catID" dataField="catID"/>
                  <mx1:DataGridColumn headerText="categoryName" dataField="categoryName"/>