Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
WebDataGrid on seperate user control causes error after postback
posted

I have a user control with one datagrid on it and I bind the data on it and all works good, I have another user control that has a web grid on it which itself is on the first user control. The 2nd user control doesn't need anything done in it but when I do a postback on the first user control I get an error of "object reference not set to an instance of an object"

I have removed the 2nd user control and everything works fine. I have also added code to set the datasource of the web data grid on the 2nd user control on page load so its always set to an empty datasource and then it doesn't error out. This is an issue that has only come to light with the release of the latest version of 13.2 and the hotfix of 13.1 

I don't want to go through all of the areas of our code to figure out where a grid's datasource where it is on a user control isn't set because its not being used. Is there a property I can set that will prevent this error from occurring or why does this occur now? 

Thanks,

Tyler

Parents
  • 235
    Offline posted

    Here is the stack trace for the error as well. 

    at Infragistics.Web.UI.GridControls.Sorting.EncodeColumnName(String columnName) at Infragistics.Web.UI.GridControls.Sorting.get_Sort() at Infragistics.Web.UI.GridControls.Sorting.SaveViewState() at Infragistics.Web.UI.Framework.ObjectCollection.SaveViewStateItems() at Infragistics.Web.UI.Framework.ObjectCollection.SaveViewState() at Infragistics.Web.UI.GridControls.WebDataGrid.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.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) 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.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) 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.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)

Reply Children
No Data