I added UnboundField in WebDataGrid and I've got in unhandled exception: Object reference not set to an instance of an object. I'm wondering what could go wrong? I tried to add it with markup and with "Edit Columns" and in any way I'm getting this exception. Has someone out there encountered this problem and found any remedies? Thanks in advance! Description: 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.Framework.Data.DataSourceControlAdapter.OnDataSourceViewSelectCallback(IEnumerable data) +168 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 Infragistics.Web.UI.Framework.Data.DataSourceControlAdapter.InitSchema(DataSourceSelectArguments arguments) +231 Infragistics.Web.UI.Framework.Data.DataSourceAdapter.Select(DataSourceSelectArguments arguments) +90 Infragistics.Web.UI.Framework.Data.DataSourceObjectView.ExecuteSelect(DataSourceSelectArguments arguments) +73 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 Infragistics.Web.UI.GridControls.WebDataGrid.DataBind() +909 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.EnsureDataBound() +84 Infragistics.Web.UI.GridControls.WebDataGrid.EnsureDataBound() +171 Infragistics.Web.UI.GridControls.WebDataGrid.CreateChildControls() +51 System.Web.UI.Control.EnsureChildControls() +87 Infragistics.Web.UI.GridControls.WebDataGrid.EnsureChildControls() +117 System.Web.UI.Control.PreRenderRecursiveInternal() +44 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
I'm wondering what could go wrong? I tried to add it with markup and with "Edit Columns" and in any way I'm getting this exception. Has someone out there encountered this problem and found any remedies?
Thanks in advance!
Description:
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.
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.Framework.Data.DataSourceControlAdapter.OnDataSourceViewSelectCallback(IEnumerable data) +168 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 Infragistics.Web.UI.Framework.Data.DataSourceControlAdapter.InitSchema(DataSourceSelectArguments arguments) +231 Infragistics.Web.UI.Framework.Data.DataSourceAdapter.Select(DataSourceSelectArguments arguments) +90 Infragistics.Web.UI.Framework.Data.DataSourceObjectView.ExecuteSelect(DataSourceSelectArguments arguments) +73 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 Infragistics.Web.UI.GridControls.WebDataGrid.DataBind() +909 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.EnsureDataBound() +84 Infragistics.Web.UI.GridControls.WebDataGrid.EnsureDataBound() +171 Infragistics.Web.UI.GridControls.WebDataGrid.CreateChildControls() +51 System.Web.UI.Control.EnsureChildControls() +87 Infragistics.Web.UI.GridControls.WebDataGrid.EnsureChildControls() +117 System.Web.UI.Control.PreRenderRecursiveInternal() +44 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Control.PreRenderRecursiveInternal() +171 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3082
Ok,
It was just regular bug:
I removed <ig:Sorting> for all columns from <ig:Behaviours> and exception dessapeared. I inserted Sorting for just one bound field again and exception came back!
So, if somebody knows how to deal with it, please let me know: I need sorting for this grid.
Thanks!
Hi dmitriykbr,
Are you getting the exception at design time or run-time? It sounds like the latter. What kind of data source do you have? And do you have the latest Service Release? Upgrading could fix it. Let me know so I can see if this issue can be reproduced.
regards,David Young
It is SQL datasource connecting to Oracle 11G.On F5 my aspx page going right to this exception if sorting even mentioned in markup. I have XP SP3, .NET 3.5 framework, VS2010 SP1, C#.Infragistics.Web.UI.GridControls Version: Infragistics35.Web,Version=11.1.20111.2020, Token=7dd5c3163f2cd0cb.If it was fixed, please provide release number.
Thanks in advance,Dmitriy
Hello,
In order to look in to this, let me know the approach you are taking to bind grid with Data Source. I have attached mark up and code behind that adds filtering functionality with unbound column. I have tested this sample using on IE 8, NetAdvantage 11.1.20111.2020, Visual Studio 2010, and Windows 7.
If this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back.
Hope this helps.
I am following up to see if you were able to test the issue you described using the code snippet I have provided.
Let me know if you need any further assistance.
Thank you for your support. We could not wait result of your investigations and I replaced ig grid with another one. That's fine. Addtional details on this issue: it appeared that this assertion with unbound field was combination of sorting and where expression: whenever I removed where expression or sorting everything fine and unbound field worked great! Thanks again for your time. == Dmitriy==