5 Replies Latest reply on Jan 5, 2010 7:59 PM by Radhakrishna Bhat

    Flash Builder 4 Beta 2 ---- Data Management Problem

    dkoehler

      Flash Builder 4 Beta 2 ---- Data Management Problem

       

      I have a simple datagrid, a PHP service and a MySQL database. When I run the code I get multiple(7) records returned to the datagrid.  Once I enable Data Management and run the exact same code, I only get 1  record returned.

       

      Is there a setting in Data Management that affects the number of records returned?

       

      Here is the MXML code I am testing. 

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                           xmlns:s="library://ns.adobe.com/flex/spark"

                           xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:carasgndataphp="services.carasgndataphp.*">

            <fx:Script>

                  <![CDATA[

                        import mx.controls.Alert;

                        import mx.events.FlexEvent;

                        var inptdata:String = "1";

                        protected function dataGrid_creationCompleteHandler(event:FlexEvent):void

                        {

                              getAsgnDataResult.token = carAsgnDataPHP.getAsgnData(inptdata);

                        }

                  ]]>

            </fx:Script>

            <fx:Declarations>

                  <s:CallResponder id="getAsgnDataResult"/>

                  <carasgndataphp:CarAsgnDataPHP id="carAsgnDataPHP" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>

                  <!-- Place non-visual elements (e.g., services, value objects) here -->

            </fx:Declarations>

            <mx:DataGrid x="115" y="91" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getAsgnDataResult.lastResult}" width="558" height="298">

                  <mx:columns>

                        <mx:DataGridColumn headerText="A" dataField="numAsgn"/>

                        <mx:DataGridColumn headerText="T" dataField="numTopic"/>

                        <mx:DataGridColumn headerText="U" dataField="numUnit"/>

                        <mx:DataGridColumn headerText="P" dataField="numProblem"/>

                        <mx:DataGridColumn headerText="TP" dataField="PType"/>

                        <mx:DataGridColumn headerText="P" dataField="numSeqPresent"/>

                        <mx:DataGridColumn headerText="F" dataField="numSeqFeedback"/>

                        <mx:DataGridColumn headerText="D" dataField="numDelay"/>

                        <mx:DataGridColumn headerText="ID" dataField="idAsgnData"/>

                        <mx:DataGridColumn headerText="IDP" dataField="idProblem"/>

                  </mx:columns>

            </mx:DataGrid>

      </s:Application>