Hello,
I realize this might be related to ASP.NET itself and not CSLA.NET, but I haven't been able to find a solution in ASP.NET forums, please shine a light on me :-)
I have a web user control which contains a GridView with a list of questions / responses, and a DetailsView that displays the selected question / response from the GridView. Both grid and details have templated fields.
When I set the DetailsView in Edit mode, change a few fields then hit the Edit link the following happens (or does not happen):
1) If I do a myDetailsView.DataBind() inside the Page_Load when IsPostBack() = true, the CslaDataSource Update method fires just fine, but the UpdateObjectArgs contain the same data the detailsView had before I changed it and hit Edit. I realize this probably has to do with DataBinding it.
2) If I DO NOT issue the myDetailsView.DataBind() inside the Page_Load when IsPostBack() = true, then the Update method does not fire at all!
So my question to you is, what am I missing here???
I will post code if required but it's a very simple bare-bones web user control slapped onto a web form. I assume I'm overlooking something very simple here!
Many thanks!
A follow-up on this.
I re-created the page one control at a time, and I was able to get all the events working properly.
So then I proceeded to paste the code to my original page and guess what!
The update event ceased to work again!
I narrowed it down to using a Master Page. Basically I have this problem when my gridview / detailsview combo are inside a Content Page. If I put them in a regular page, the events work fine.
Stumped...
Copyright (c) Marimer LLC