There was an issue reported with NullReferenceException on SaveViewState about 6 months ago, and a fix was provided, however I am now getting this error when expanding on WebHierarchicalDataGrid.
Version: 15.2.20152.2042
This occurs after expanding and it seems to happen only after several items have been expanded, then the error occurs every time expand is done. After the page is refreshed, expand works again even on the same records that previously produced errors.
Adding: the error occurs after changing a dataset parameter and doing an expand on the new records, however only if expand was done on the list before changing the parameter which is based on a drop-down. So to reproduce: Display page, expand a record, change the drop-down which displays the grid with new records then expand a record and the error occurs. If you do not expand when the grid listing is based on the original parameter and then change the drop-down, the error does not occur when expanding on the new grid listing.
Exception information: Exception type: NullReferenceException Exception message: Object reference not set to an instance of an object. at Infragistics.Web.UI.GridControls.Filtering.SaveViewState() at Infragistics.Web.UI.Framework.ObjectBase.System.Web.UI.IStateManager.SaveViewState() at Infragistics.Web.UI.Framework.ObjectCollection.SaveViewStateItems() at Infragistics.Web.UI.Framework.ObjectCollection.SaveViewState() at Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.SaveViewState() at Infragistics.Web.UI.GridControls.WebDataGrid.SaveViewState() at Infragistics.Web.UI.GridControls.ContainerGrid.SaveViewState() at Infragistics.Web.UI.GridControls.ContainerGrid.System.Web.UI.IStateManager.SaveViewState() at Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid.SaveViewState() at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) at System.Web.UI.Page.SaveAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Hello,
Thank you for contacting Infragistics!
Could please provide isolated sample replicating your issue?
Hi Denis .. I am working on something to send you, but in my testing here are a few things I discovered:
- Converting back to 15.1 resolves the problem when filtering is turned off
- Converting back to 13.1 completely resolves the problem with or without filtering
I have reviewed the error stack trace unfortunately I am unable to tell for sure what can cause the issue.
Providing a working isolated sample, which I can inspect will help me resolve this issue.
Looking forward for your sample.
Latest update ... I updated to the latest service release and everything is ok as long as I turn filtering off. Maybe I'll try 2016.
Here is the problem .. when a null value is in the dataset the error occurs. I tested this by purposely including and not including null values in the dataset. When null values are in the dataset I get this:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.GridControls.Filtering.SaveViewState() +1168 Infragistics.Web.UI.Framework.ObjectBase.System.Web.UI.IStateManager.SaveViewState() +38 Infragistics.Web.UI.Framework.ObjectCollection.SaveViewStateItems() +209 Infragistics.Web.UI.Framework.ObjectCollection.SaveViewState() +91 Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.SaveViewState() +38 Infragistics.Web.UI.GridControls.WebDataGrid.SaveViewState() +351 Infragistics.Web.UI.GridControls.ContainerGrid.SaveViewState() +305 Infragistics.Web.UI.GridControls.ContainerGrid.System.Web.UI.IStateManager.SaveViewState() +38 Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid.SaveViewState() +569 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +93 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +319 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +319 System.Web.UI.Page.SaveAllState() +574 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1225