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
1145
Exceptions when navigating in an SPA
posted

Our application is a single page application (SPA) and has a number of grids. Some of these grids are loaded with data as soon as you go to the page, using the dataSource option. This works great except, if I navigate away from a page (which involves removing the HTML for that page, and thus the HTML for the grid from the current page and injectiong the HTML of a new page) before the grid has been populated, then the callback to populate the grid throws an exception. The call stack is:

	_inferOpType [infragistics.ui.grid.framework.js] Line 28
 	Anonymous Function [jquery-ui.js] Line 401
 	_renderData [infragistics.ui.grid.framework.js] Line 26
 	Anonymous Function [jquery-ui.js] Line 401	
 	proxy [jquery-1.9.1.js] Line 818	
 	_completeCallback [infragistics.datasource.js] Line 35	
 	fire [jquery-1.9.1.js] Line 1037	
 	fireWith [jquery-1.9.1.js] Line 1148	
 	done [jquery-1.9.1.js] Line 8089	
 	callback [jquery-1.9.1.js] Line 8598	


Is there any way I can prevent this? I mean, I could load the data using an ajax call and then verify the grid's still there before trying to assign the data, but I just wanted to see if maybe there way some way I could either prevent or quietly dispose of this exception...

Parents
  • 24671
    Verified Answer
    posted

    Hi Pete,

    which code do you call when you navigate away from a page? Do you destroy the grid?

    $("#grid1").igGrid("destroy");

    I guess something is not cleaning up.

    Hope it helps. Thanks,

    Angel

Reply Children