Solved

updating a dataGrid in Flash cs3 AS3

Posted on 2008-06-11
9
1,941 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
ID: 21758621
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
ID: 21758790
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
ID: 21758802
"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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 1

Author Comment

by:derrida
ID: 21758904
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
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 21758952
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
ID: 21839831
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
ID: 21844069
Sure :)
0
 
LVL 1

Author Comment

by:derrida
ID: 21844168
0
 
LVL 1

Accepted Solution

by:
derrida earned 0 total points
ID: 21940059
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

832 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