You could do the data population in the prerender event, since this event gets called before the html is spit back to the client. (haven't tested this though)

If the containers visible property is set to false, this event does not get raised.