The reason for all that recycling is this: you're calling the refresh method, hence you're explicitly asking for all this recycling. It will invalidate all the sorts and filters applied to your collection, hence all the positions of the items in the datagrid are invalidated and every item is recycled.
So you should remove this call. After that something like this should then do what you expect:
private var colValue:String;
override public function prepare(hasBeenRecycled:Boolean):void {
if (data && colValue != data[column.dataField]) {
colValue = data[column.dataField];
lblData.text = colValue;
myAnimation.play();
}
}
The prepare
method will still be called every time, but your animation will only be played when the value has actually changed.