Solved

updating a dataGrid in Flash cs3 AS3

Posted on 2008-06-11
9
1,919 Views
Last Modified: 2011-10-03
Hi
i have a form that insert an article into the database. and i have a datagrid that display all the articles.
the problem: the insert is working but in order to see the update in the datagrid i need to re-run the php file that output the xml for the datagrid.

how can i refresh or update the datagrid?

best regards

ron
0
Comment
Question by:derrida
  • 5
  • 4
9 Comments
 
LVL 12

Expert Comment

by:SamuelRostol
Comment Utility
Is this a impossible solution:

Create a loop that removes all info from the datagrid and attaches the new information.
0
 
LVL 1

Author Comment

by:derrida
Comment Utility
hi
i do not uderstand why you think this approach is relevant. the point is that the datagrid show the new article and not first remove all and re-load all.

ron
0
 
LVL 12

Expert Comment

by:SamuelRostol
Comment Utility
"how can i refresh or update the datagrid?"

By removing content and adding new refreshed content... That's why I thought it was relevant.
0
 
LVL 1

Author Comment

by:derrida
Comment Utility
hi
in any case i tried it and it does not work. i clear all from the datagrid and recall the function that load the data but the changes are not seen. only after i run the php file that output the xml the changes are made.

best regards

ron
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 12

Expert Comment

by:SamuelRostol
Comment Utility
Well, that's a given - you'll have to get the information from the database too be able to update with the changes..

Or - if you add the article from the same flash-file, you could just add it to the variable you use to populate the datagrid at the same time, and then update the datagrid based on the variable..?
0
 
LVL 1

Author Comment

by:derrida
Comment Utility
ho hi
i do not know how i have ignored your last answer. but i cannot understand it. can i upload the file so you can see it?

ron
0
 
LVL 12

Expert Comment

by:SamuelRostol
Comment Utility
Sure :)
0
 
LVL 1

Author Comment

by:derrida
Comment Utility
0
 
LVL 1

Accepted Solution

by:
derrida earned 0 total points
Comment Utility
Hi
whell i fixed the problem myself. the datagrid has a dataprovider and inorder to update the dataprovider use the 3 options accordingly:
addItem / removeItem / replaceItem

at the same time update or delete or add to your database as if independently from the "refreshing" of the dataprovider.

hope it will hel someone, as it took me a long time.

ron
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now