This content has been marked as final. Show 8 replies
really need an awnser for this one please, is there a method or not one?
use java sript function for dat
anything a bit less vague? i'm not experienced with JS so some code to point me in right direction would be helpful!
I still don't understand why there isn't a refresh method or something. The original data is still there (like i said i tested for it with xmlconnector.results();) i just can't find a method to refresh the dataGrid with original data; without doing .trigger(); which reloads the data from the external file.
I'm not familiar with datagrids, but have 2 thoughts:
you said the data gets loaded into a dataset first and then into the datagrid. Now I don't know if the dataset also changes when the datagrid is edited, if not, you could probably just re-assign the dataset to the datagrid?
Another way: if the xml data still exists, why not call the the onLoad event again for reloading? I mean, there should be some function that transfers the data into the grid when the xml was loaded. Just do this again for the reload.
Those were my thoughts blemmo, but i can't find the method to reload thats the problem. The function that iv'e been using to load the data into the datagrid is the xmlconnection.trigger(); which also reloads the raw xml from the file. I havent tried re-assigning the dataset but i'm not sure about this as they are all connected using bindings - i havent seen any reference to these in AS help but i may just be missing it, i'll have another look.
Perhaps the best thing would be to store a 'backup' of the data in an object or array and reset the datagrid from there using
my_dg.dataProvider = my_obj;
I tried doing this:
var test = items_ds.dataProvider;
items_ds.dataProvider = test;
And it seems to do something: it pauses a split second as if loading data, it resets the item in focus on the datagrid to the first item, but it doesnt seem to refresh the data back to the original values.
I tried using:
after, but it made no difference.
This is so annyoing, the data is there, i know this, i just cant get it to refresh in anyway and the documentation on this is so vague.
Anyone got more ideas?
I know its been a while but I just came accross a solution and immediatley thought of you...
The problem is with Flash, when a datagrid needs to be reloaded the dg is supposed to recieve a broadcast message called "updateAll". However, changing the dataprovider doesnt send out this message as it should, the datagrid doesnt know its supposed to change its info and nothing happens.
The solution is to use a dataset as an intermediary...the help files should get you started and I can help if you struggle (if its still an issue of course)