2 Replies Latest reply on May 5, 2012 3:06 PM by pao1011

    How to update 2 datagrids in 2 different app at the same time?


      I'm very new to flex/flash builder and my question is: first I have to explain how the applications works. The first applications have a form for a customer to fill and datagrid to show the results.The data is send using PHP to a database in the server. The second application have a datagrid for the admin  that show the data that the first application send. Now, when  the data is inserted in the database, the first application dataGrid show the result soon as the records are inserted in the database, but the second application show the records after I refresh the Browser. The second aplication have a delete button to clear records from the database as is obious, the firstt database needs to be refreshed in order to see if the record has been deleted. So what I need is that both applications update as soon as the database is altered.If anyone have a suggestion I appreciate very much thanks in advance.

        • 1. Re: How to update 2 datagrids in 2 different app at the same time?
          ShardulSingh Level 3



          For the Scenario which you are asking at the server side "Blaze Ds" should be used.But as you are having the php at the back end so I will prefer you to keep hitting a httpService or web service by the second application(by using the timer with small interval) and get the result on a specific time interval.When the return result is different then the previous one then just use that data to populate in you grid.




          with Regards,


          • 2. Re: How to update 2 datagrids in 2 different app at the same time?
            pao1011 Level 1

            Then, the time interval should be implemented in both applications since the first one inserts data and the second one delete the data. Instead of doing time interval I eliminate the second app and make 'states' in the first app for the 'add' and 'delete' data so I was able to open two instances of the app, one using the add state and the other with the delete state thinking that since was the same application both update at the same time but unfortunately I was wrong and one needs the browser refresh anyway. I really not know how to do time interval in flex since is different to flash that you just do the interval for the next frame and back to the first to load the data since is a timeline based app, flex not, besides, I'm just start using flex a couple weeks ago and don't know much about the coding  but I will keep researching to do that. Thanks for the advice and sorry to take so long to answer.