• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1981
  • Last Modified:

updating a dataGrid in Flash cs3 AS3

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
derrida
Asked:
derrida
  • 5
  • 4
1 Solution
 
SamuelRostolCommented:
Is this a impossible solution:

Create a loop that removes all info from the datagrid and attaches the new information.
0
 
derridaAuthor Commented:
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
 
SamuelRostolCommented:
"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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
derridaAuthor Commented:
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
 
SamuelRostolCommented:
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
 
derridaAuthor Commented:
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
 
SamuelRostolCommented:
Sure :)
0
 
derridaAuthor Commented:
0
 
derridaAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now