We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Error "n[o] is undefined" adding an element to observableArray

Hi
I'm struggling with an exception raised on the ej.web.all.min.js file when adding an element to an observableArray binded to the dataSource of a TreeGrid.


Error details:

columnNumber: 4190094
fileName: http://localhost:40834/Scripts/ej/web/ej.web.all.min.js
lineNumber: 10
message: "n[o] is undefined"
stack: "._reconstructDatasource@http://localhost:40834/Scripts/ej/web/ej.web.all.min.js:10:4190094._refreshDataSource@http://localhost:40834/Scripts/ej/web/ej.web.all.min.js:10:4178814._setModel@http://localhost:40834/Scripts/ej/web/ej.web.all.min.js:10:4169253t.widgetBase.option@http://localhost:40834/Scripts/ej/web/ej.web.all.min.js:10:14068t.extensions.ko.raise@http://localhost:40834/scripts/ej/common/ej.widget.ko.min.js:10:2785t.proxy/<@http://localhost:40834/Scripts/ej/web/ej.web.all.min.js:10:25856D.notifySubscribers@http://localhost:40834/Scripts/knockout-3.4.0.js:37:106B.fa@http://localhost:40834/Scripts/knockout-3.4.0.js:40:494a.la.fn[b]@http://localhost:40834/Scripts/knockout-3.4.0.js:44:320AssetsViewModel/self.addItemToGrid@http://localhost:40834/ViewModels/AssetsViewModel.js:22:9AssetsViewModel/self.createAsset/<.success@http://localhost:40834/ViewModels/AssetsViewModel.js:140:17jQuery.Callbacks/fire@http://localhost:40834/Scripts/jquery-3.1.1.js:3305:11jQuery.Callbacks/self.fireWith@http://localhost:40834/Scripts/jquery-3.1.1.js:3435:7done@http://localhost:40834/Scripts/jquery-3.1.1.js:9242:5.send/callback/<@http://localhost:40834/Scripts/jquery-3.1.1.js:9484:9"

If you need more details, please let me know and I'll try to give you what you need.
Thank you




3 Replies

MK Mahalakshmi Karthikeyan Syncfusion Team January 17, 2017 02:53 PM UTC

Hi Cristian, 
Sorry for the inconvenience caused. 
We were not able to reproduce the reported issue from our side. As per your issue report we suspect that you are trying the reload the self-reference datasource using setModel. We have also prepared a sample based on this and you can find the sample from the following link. 
If you still facing any issue, please modify this sample and get back to us with the replication procedure to reproduce it. 
Regards, 
Mahalakshmi K. 



CB Cristian Bellotto January 18, 2017 08:08 AM UTC

Thank you for your answer. We have been able to replicate the issue.
The problem comes out with the version 14.4.0.20, instead with the 14.4.0.15 version it's working correctly.

For your convenience, I have modified your sample. You can find it here http://jsplayground.syncfusion.com/1rffybxq

Thank you for your support



JS Jonesherine Stephen Syncfusion Team January 19, 2017 01:14 PM UTC

Hi Cristian, 
We were able to reproduce the issue while adding data dynamically by using setModel and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue. 
Please log on to our support website to check for further updates. 
Please let us know if you require further assistance on this.
Regards,
Jone sherine P S
 


Loader.
Live Chat Icon For mobile
Up arrow icon