2 Replies Latest reply on Jun 2, 2008 1:55 PM by czou

    datagrid refresh after pop up window closed


      I am pretty new to Flex. I have a simple question which I think someone can certainly help.

      So basically my main page contains a datagrid that maps to a XMLListCollection that tied to a php backend (this php script queries a db table). From the main page, I can invoke a pop up window which displays a form. Once the form is submitted(the same table is updated correctly), how can I refresh the datagrid?

      Any help would be greatly appreciated!

      Here is the code sample:

      ----in the main page
      <mx:HTTPService id="ds" url="" method="GET" resultFormat="e4x"/>
      <mx:XMLListCollection id="xmlList" source="{ds.lastResult.People}" />

      <mx:DataGrid id="peoplelist" initialize="ds.send()" dataProvider="{xmlList}">
      <mx:DataGridColumn dataField="ID" />
      <mx:DataGridColumn dataField="Name" />
      -- action script to handle submit action
      public function submit():void
      srv.send(); //this send HTTP POST request which is executed successfully