Arrays and the DataGrid

Hi,

I am currently building a shopping basket for a small site, each item is put into flash manually so I am not pulling anything from a database.

Now my question is this, I’ve done a small example that adds to a DataGrid using the addItem() function - this works great. BUT, the problem is the DataGrid won’t be visible in the final site until the user clicks on a basket button or something like that.

So, my question is, how can I add to this DataGrid if it is not visible? Can I add to an array, and then populate the DataGrid with the values in the array using the for each loop each time the user wants to see the basket?

Cheers,
Chris