Hi,
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="
http://127.0.0.1:81/test.php"method="GET" resultFormat="e4x"/>
<mx:XMLListCollection id="xmlList"
source="{ds.lastResult.People}" />
<mx:DataGrid id="peoplelist" initialize="ds.send()"
dataProvider="{xmlList}">
<mx:columns>
<mx:DataGridColumn dataField="ID" />
<mx:DataGridColumn dataField="Name" />
</mx:columns>
</mx:DataGrid>
-- action script to handle submit action
public function submit():void
{
srv.send(); //this send HTTP POST request which is executed
successfully
PopUpManager.removePopUp(_window);
ds.send();
xmlList.refresh();
}