7 Replies Latest reply on Oct 29, 2007 5:44 PM by ntsiii

    Reading external data into mx:Grid elements

    jlmoller
      I want to do the same sort of thing that is shown at ' http://www.adobe.com/devnet/flex/articles/flex2_php_04.html', but with a Canvas that is set up as an mx:Grid - this is a user updatable Flex 2 Form.

      ie the example DataGrid is set up this way:

      <mx:DataGrid id="dgUserRequest" x="22" y="128" dataProvider="{userRequest.result.users.user}">
      <mx:columns>
      <mx:DataGridColumn headerText="User ID" dataField="userid"/>
      <mx:DataGridColumn headerText="User Name" dataField="username"/>
      </mx:columns>
      </mx:DataGrid>

      mx:DataGrid has a dataProvider attribute where you can associate the results (formatted in XML) to existing data fields.

      How would I do something similar with an mx:Grid that needs to recieve updated mx:TextInput fields? I connect to a PHP application that validates the user on 1 mx:Canvas in an mx:ViewStack, and if the user is valid, I return an XML structure that has the last known values for this mx:Grid based form on a different Canvas. How do I process this data and load the mx:TextInput fields with an extract of the XML data sent fron the PHP application?