This content has been marked as final. Show 6 replies
First, this is not a Flex Builder question so it should go in the General Discussion forum, not here.
Now, you should not use plain arrays as dataProviders. Instead, wrap them in ArrayCollections:
var acDataProvider:ArrayCollection = new ArrayCollection(myArray);
now you can use acDataProvider.addItem();
Thanks for answer!
First, sorry! I hope that admin move it to Gen. Disc. forum.
My DataProvider is external XML. I thought that AS recognize it as ArrayCollection. It looks like this:
public var XMLtest : XML;
XMLtest = XML(xmlFiletest.lastResult);
// in my DataGrid
It's really huge XML (few MB's). I don't use addItem because I don't need this.
Is it mean that this Warning - "For Array, please use ArrayCollection.getItemAt() instead." is out of sense???
I can try convert it to ArrayCollection but I'm afraid that can make my app much slower :(((
Do you have some suggestions?
See my response on the General Discussion forum.
One solution to the original problem is to use an external itemRenderer. in that you will not need to try to bind, and can set the value using the array syntax.
I put more code on the General Discussion forum.
Topic: "large external XML file"