I have a screen with a DataGrid that displays "live" data, that is, data which is constantly changing. It's not a very large amount of data, so I just make a query to the server every 2 seconds to get the new data.
When the new data comes in, the easiest thing to do would be to simply set the dataProvider of the DataGrid to the new data, but this is really crude. For starters, if over-writes imports properties such as how the array is sorted and which items are selected. So, to correct for these problems, what I do is iterate through each item in the dataProvider of the DataGrid, find the corresponding item in the new data and copy its properties to the item in dataProvider, remove any items from the dataProvider that are not in the new data, and then add any items from the new data that aren't in the dataProvider. Needless to say, this is terribly inefficient. So, what should I be doing? This has to be done in AS2 because it is being incorporated in a legacy application. Thanks! _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders