Faster way would be to use ArrayCollection.source Array to loop through and
manipulate data.
Then when you got resultArray do: acResult = new
ArrayCollection(resultArray);
That way you don't need refresh(), if you do, then call it only once at the
end. Don't call it from loop.
To make it more clean, and also possible faster, you can make new Class
(valueObject) in order to type objects like:
{Fname: "Kranthi", Lname:"Kata", dob:"21/10/1972", Amount_1:10000,
Amount_2:10}
So, for example, instead of:
acResult.getItemAt(j)["Amount_1"] += ac.getItemAt(i)["Amount_1"];
in the end you can have:
myDataObj = acResult[j];
myDataObj.Amount_1 += srcArray[i].Amount_1;
--
View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Consolidate-items-from-ArrayCollection-tp13509p13525.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.