3 Replies Latest reply on Aug 17, 2006 7:34 AM by peterent

    Help!  How to update a two dimensional ArrayCollection?

      Hi there,

      I'm having an issue understanding the documentation about populating a DataGrid from a two dimensional ArrayCollection. My situation is I have a DataGrid with a bunch of information, currently stored as a two-dimensional array (numerical in the first dimension, and by field name in the second dimension). I also have a bunch of data streaming in from an XMLSocket, which when it arrives, is parsed, resulting in one of the fields in the array needing updating. I can do this fine with the array directly, but I'm having trouble trying to understand how to use the ArrayCollection functionality to traverse this two-dimensional structure - setItemAt() doesn't seem suited to this purpose? I will need to trigger Effects on the relevant cell that has updated, when I get round to coding that, so I'm trying to use some structure that handles update events and such for me automatically, such as the ArrayCollection.

      I'm not sure this is even the best technique to use, and the middle tier (the ArrayCollection and such) could be completely changed, so if you can suggest (and illustrate, if it's as confusing as this!) a better method, I'd appreciate it.