Variable reset to default in a function bound to text

Well, this is definitely something I can’t understand…

I have an in-game trade system; I create items dynamically and set an ItemData variable to each item:

Then I use ItemData in a function to display the item’s name, price, etc. (binding it to text). Up to here, all is fine.

When I drag and drop an item to the inventory, I use a Refresh function to show the items left in the store.

The ItemData variable is set correctly. However, when the GetName function is called again (after Refreh), ItemData is reset to its default values:

Any ideas why this happens?

Many thanks!