I have an unbound checkbox, template field (with button) and a couple of bound fields.
The grid has AJAX enabled.
Load the data on postback using WebHierarchicalDataSource in code behind.
Check the checkbox of a row = ok
Check the checkbox or another row, a post back occurs and get the error blow.
The Behaviors that are enabled:
ERROR
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.Source: System.WebStack trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.maintenancescreens_hewitt_retentionmaintenance_aspx.ProcessRequest(HttpContext context) in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nettraxnet.dev\70a61a39\76f3f529\App_Web_fz2gmtg0.2.vb:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Details: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource.FindControlRecursive(Control root, String id) at Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource.GetOriginalDataSource(String id) at Infragistics.Web.UI.DataSourceControls.WebHierarchicalFlatDataSourceView.get_OriginalDataSource() at Infragistics.Web.UI.DataSourceControls.WebHierarchicalFlatDataSourceView.get_UpdateParameters() at Infragistics.Web.UI.Framework.Data.DataSourceControlAdapter.get_UpdateParameters() at Infragistics.Web.UI.Framework.Data.DataSourceObjectView.get_UpdateParameters() at Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag) at Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag) at Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) at Infragistics.Web.UI.GridControls.ContainerGridBot.LoadAdditionalClientState(Object state) at Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() at Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() at Infragistics.Web.UI.GridControls.ContainerGrid.RaisePostDataChangedEvent() at System.Web.UI.Page.RaiseChangedEvents() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.maintenancescreens_hewitt_retentionmaintenance_aspx.ProcessRequest(HttpContext context) in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nettraxnet.dev\70a61a39\76f3f529\App_Web_fz2gmtg0.2.vb:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Referencing
Infragistics45.Web.v15.2
Version: 15.2.20152.2042
Hi,
Thank you for posting in the Infragistics community !
Please make sure that you have jQuery referenced in your page as this is what the error ($ is undefined) hints. Please let me know the result.
jQuery is referenced:
<link href="../../ig_res/Default/ig_shared.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_shared.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_dataGrid.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_dialogwindow.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/Default/ig_texteditor.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_hierarchicalDataGrid.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_webtab.css" type="text/css" rel="stylesheet" /><link href="../../Styles/Site.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../../Scripts/jquery-2.1.4.min.js"></script> <script type="text/javascript" src="../../Scripts/slide-footer.js"></script>
When the error is thrown, it fails on the client side and the first line happens to be a jQuery call and that is the message that IE displays. The root of the problem seems to be in the binding, but, why does the grid do a postback when checking a checkbox (there are no event to trigger a postback). Why the 2nd or 3rd check and not the checked item?
Object reference not set to an instance of an object. at Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource.FindControlRecursive(Control root, String id)
Hi Pete,
Still it seems like a classic issue - jQuery may be referenced but the resource actually to fail loading (a wrong path, etc). It is also possible that jQuery reference comes after the code that tries to use it, a jQuery conflict, etc. In any case it does not seem an issue related to Infragistics products. If you believe it is please try to explain why, so that I can have a further look at it.
I did a few things:
1) Cleared the ASP.Net Temp folder
2) Turned on/off behaviors.
These seem to have fixed the problem. For now, I'll consider this item closed unless it comes up again.
Thank you for the provided information. This behavior is strange and is not known to occur. I am still unable to replicate, so I suggest to isolate the issue in a small sample that you can send to us for investigation. Then I will be able to suggest accordingly.
Initial Load:
<link href="../../ig_res/Default/ig_shared.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_shared.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_dataGrid.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_dialogwindow.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/Default/ig_texteditor.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_hierarchicalDataGrid.css" type="text/css" rel="stylesheet" /><link href="../../ig_res/RedPlanet/ig_webtab.css" type="text/css" rel="stylesheet" />
After clicking on the 2nd row (checkbox) there is a postback that occurs:
link href="ig_res/RedPlanet/ig_shared.css" type="text/css" rel="stylesheet" /><link href="ig_res/RedPlanet/ig_dialogwindow.css" type="text/css" rel="stylesheet" />
The other pattern I see... I can have one item checked. Uncheck and check another no error, but, once I check 2 rows. Then a post back occurs. Not sure why a postback would happen when items are checked on the grid.
I ran Fiddler and it's a reference issue, but, the page loads and it's not until the second row is checked the error occurs?
What would cause the references to change?