View Full Version : refresh a datagrid content

03-14-2008, 07:55 PM
Hey guys,
I'm new to flex and I'm stuck with a small problem...
i have a XML file which is the output of a MySQL table. Now, i have a httpservice that loads this XML file then with the result event send the data to a datagrid. Now the problem is that the table is getting updated once an hour and the XML that it outputs also gets updated, to get the table updated i wanted to add a "refresh" button to reload the data from the new XML file and show it on the datagrid.. i tried calling the send() function of the httpservice after clicking on the refresh button and then use the arraycollection refresh() but no luck there..
Is there any way to get the httpservice reload the XML file and then update the datagrid to show it?
Thank you for taking the time to trying to help me ;)

03-18-2008, 12:52 PM

I had the same problem for a project of mine. I stopt using the httpservice and started to use remoteobjects this is working fine and have no problems updating my datagrid whit a refresh button.
I use amfphp and do not now if you are using that aswell but i hope that this is wat you need.
here is a little tutorial : http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/

03-20-2008, 06:21 PM
Can you verify that you are getting the updated xml file after calling send() again? Ii guess I'm not sure if the problem is that you're not getting the data back or if it's just the datagrid not refreshing.