Hi,
I am using an iggrid, on teh first load of the page, the grid gives me this error :
bower_components/ignite-ui/infragistics.lob.js
0x800a138f - JavaScript runtime error: Unable to get property 'data' of undefined or null reference
But if I try to reload the page, the iggrid is correctly populated.I debugged the code, the data exists in my controller. When binding my grif through code using :
$("#Grid").igGrid("dataSourceObject", self.data);$("#Grid").igGrid("dataBind");
The error happens during the dataBind even if self.data was corrcetly populated by a valid JSON.
Do you have an idea on what is happening ?
Thanks
It turns out that the issue came from the filtering.
When I get rid of the Filtering feature, the grid is loaded as expected.
This issue could has many possible causes. I would require a isolated sample that reproduces this issue to assist you in debugging this issue.
Let me know if you have any questions.
The self is not the issue as if I use "this" I get the same issue.A weird thing though is that if I get rid of one column in the grid, I don't have this issue.
The column is defined as <column key="payrollPeriodStatusName" header-text="Reporting Period" width="25%" data-type="string"></column>
When this column is present I get {"description":"Unable to get property 'data' of undefined or null reference","number":-2146823281,"stack":"TypeError: Unable to get property 'data' of undefined or null reference\n at _clearEditorNotifier (http://localhost:2016/Scripts/bower_components/ignite-ui/infragistics.lob.js:92:22416)\n at Anonymous function (http://localhost:2016/Scripts/bower_components/jquery-ui/jquery-ui.min.js:6:7943)\n at value (http://localhost:2016/Scripts/bower_components/ignite-ui/infragistics.lob.js:91:11274)\n at Anonymous function (http://localhost:2016/Scripts/bower_components/jquery-ui/jquery-ui.min.js:6:7943)\n at _onUIDirty (http://localhost:2016/Scripts/bower_components/ignite-ui/infragistics.lob.js:226:13951)\n at Anonymous function (http://localhost:2016/Scripts/bower_components/jquery-ui/jquery-ui.min.js:6:7943)\n at f (http://localhost:2016/Scripts/bower_components/jquery/dist/jquery.min.js:2:3601)\n at n.event.dispatch (http://localhost:2016/Scripts/bower_components/jquery/dist/jquery.min.js:3:7460)\n at r.handle (http://localhost:2016/Scripts/bower_components/jquery/dist/jquery.min.js:3:5524)\n at trigger (http://localhost:2016/Scripts/bower_components/jquery/dist/jquery.min.js:4:4658)"}
When I take it out of the grid, it works corrcetly which is very weird..
Hello,
As per the error you are receiving:
It states that it is trying to fetch the data property from an undefined or null reference, meaning that self is not defined when invoking the dataSourceObject method.
Try placing a console.log(self) before invoking dataSourceObject and see what the value for self is for yourself before receiving the error.
If a isolated sample that reproduces this behavior cannot be provided, I recommend using the browser's developer tools and stepping through the logic used to assign self. Here is some documentation on debugging javascript using Chrome's developer tools:
https://developer.chrome.com/devtools/docs/javascript-debugging
The self is definitely not null or undefined as I was saying in my first message.I can't manage to reproduce it in a simple way outside of my application.