.NET Framework 4.6.1
We upgraded our solutions from Infragistics45.Web.v14.1, Version=14.1.20141.2150 to Infragistics45.Web.v15.2, Version=15.2.20152.2042. It introduced an error on our WHDG with a SummaryRow. The grid is on a WebTab. The grid and behaviors are being created on the server in the Grid_Init event. This event executes when the page loads and again on each tab change. The grid columns, behaviors and bands are cleared in the Grid_Init, then built again. The problem with the 15.2 release is the SummaryRow is being built twice.
The order of execution has changed between 14.1 and 15.2. In 14.1 the Grid_Init always executes prior to Page_Init. In 15.2 the Grid_Init executes prior to Page_Init when the page first loads. But on the tab change event, the Page_Init executes first. I do not know if this is connected to the change in behavior but just something I noticed. Any ideas on why this changed? Thanks.
Hello,
Thank you for contacting us and for the provided information.
About your question, there were a lot of changes between 14.1 and 15.2, like issue fixes, Grid performance improvements etc, so I could not tell you exactly what is causing this change. As a suggestion, you could check if the summary row is build and to skip the second build.
Also I can assure you that the event execution wont change soon, as I see the sequence is Grid_Init -> Page_Init -> Page_Load
Thank you for the response. Take your example and add the following to the WebTab.
AutoPostBackFlags-SelectedIndexChanged="On"
You will see when you change tabs the sequence is different. This changed between IG releases.
Page_Init -> Grid_Init
I did get beyond the summary row error by only building the summary row when not isPostBack. But I have encountered another error that I cannot get resolved. It does not appear to be the change in sequence. We have a WebTab that contains 5 tabs with user controls. On the first tab there is an icon that calls a popup. When the popup data is saved, the popup closes and the page behind is refreshed. Then we get a viewstate error. No other changes have been made to our code except the Infragistics upgrade. This worked correctly in 14.1. We have included InstantiateTemplates on all the WebTabs which fixed many of our errors with the upgrade but not this one. Any ideas?
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Stack Trace
StackTrace Information--------------------------------------------- at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.get_TemplateContainerControl() at Infragistics.Web.UI.GridControls.WebDataGrid.InstantiateTemplates() at Infragistics.Web.UI.GridControls.ContainerGrid.EnsureTemplates() at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.OnPreRender(EventArgs e) at Infragistics.Web.UI.GridControls.WebDataGrid.OnPreRender(EventArgs e) at Infragistics.Web.UI.GridControls.ContainerGrid.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)