4 Replies Latest reply on Jun 17, 2013 5:21 AM by marshom

    problem Module/datagrid, one time with data, one time is null

    marshom

      Hello All

      thanks for this discussion place, i have a problem in Flash Builder 4.6 (sdk 4.6.0), construct an application who connect to DB, for now, the CRUD works fine with flex service,

      i have a problem with a datagrid, one time it's worked fine, and another time my obj is null, i cannot understand why.. the fact it's work one time trouble me.. and i have no error in console..

      the target, is to edit a row of datagrid in popup, it's work as you stay in the ModuleClient, but when i launch another Module and come back to ModuleClient, the edit datagrid doesn't work anymore

       

      i try to put the process here, as the app is large: (say to me if you want more code, i will try to isolate some pieces)

      debug-datagrid.jpg

      - click in ModuleMenu and load ModuleClient in ModuleContent

      - dataGrid populate with ArrayCollection

      - double click row in dataGrid (dataGrid_doubleClickHandler(event:MouseEvent))

      - dataGridClients.selectedItem contains effective data

      - push data to ValueObject (ClientObj) already defined in flex services/connected to DB

                var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;

      - push data ClientDataGrid to Popup

                in Popup: <valueObjects:ClientObj id="clientObj"/>

      - works fine

       

      if i select another Module in ModuleMenu, and later relaunch ModuleClient

       

      - dataGrid populate with ArrayCollection

      - double click row in dataGrid

      - dataGridClients.selectedItem contains effective data

      - push data to ValueObject (ClientObj) already defined in flex services/connected to DB

                var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;

      - ClientDataGrid is null

      - cannot push data ClientDataGrid to Popup as ClientDataGrid is null

      - doesn’t work

       

       

      <s:DataGrid id="dataGridClients" left="0" right="230" top="66" bottom="10"

      creationComplete="dataGrid_creationCompleteHandler(event)"

      dataProvider="{clientListeSimpleResult.lastResult}"

      doubleClick="dataGrid_doubleClickHandler(event)" doubleClickEnabled="true"

      alternatingRowColors="[#FFFFFF, #f4f3f2]">

       

       

      Thanks in advance for any advices/ideas

      i think i make misunderstood of something, im not a flex/flash as3 coder

      so any help would be greatly appreciated

      best regards anyway