开发者

Why does my DataGrid flat refuse to reload itself from ViewState on Postback?

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 开发者_如何学Godo 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜