views:

27

answers:

1

I have a DataGrid control that refuses to reload itself from View State on Postback. I've traced this all the way back to the Load event on the control. It just flat refuses to reload from ViewState. It just doesn't do it.

The control is situated like this:

Webform
--> Dynamically loaded User Control (via "LoadControl")
----> Statically placed User Control
------> DataGrid

Yes, I know it's a little convoluted, but all the other controls on the page are reloading themselves, except for this DataGrid.

I've tried all the usual suspects --

The Control Tree is the same on page load and postback.

I've tried setting TrackViewState as well. That didn't do anything either.

Now, this is the weird part: this worked fine, then broke. I've gone back through Subversion and reviewed all the code changes for the last month, and there's nothing that would have changed this.

This makes me wonder if this can behavior somehow be affected from some external variable -- something external to the code. Is there some setting or something that might change how this behaves?

A: 

Are you hitting the issue where the control isn't actually present when its doing the load from ViewState? http://msdn.microsoft.com/en-us/library/ms178472.aspx

Jason M