Here is the scenario I'm trying to implement.
I have a list of Product objects, each of which has a list Price objects. I'm trying to display this data by using a DataList, where each element of the DataList is a GridView for a Product, displaying the Prices for that Product.
I have everything working great, except for one strange requirement: I need to show the Product name in the header of the first column of each Gridview.
There are numerous questions on SO about dynamically changing the HeaderText of a GridView, but this situation seems a little different since I need to set it to a databound value of a parent control.
My first attempt was to set the GridView Column[0] header text in the ItemCreated event of the DataList. This didn't work because they would all disappear after postback.
Thanks for your help!