This is a migrated thread and some comments may be shown as answers.

Local CRUD Operations doesn't work with kendo.data.Model.define

2 Answers 72 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Christian Storb
Top achievements
Rank 2
Veteran
Christian Storb asked on 25 Aug 2020, 08:05 AM

I've modified the first example at https://docs.telerik.com/kendo-ui/framework/datasource/crud by using a model that is strictly typed with kendo.data.Model.define instead of using the flat JSON object array. If I click on the edit button in a row in the grid and change the value of "Units in Stock" and then click on the cancel button, the change will NOT be discarded. The error "kendo.all.min.js: 27 Uncaught TypeError: n.wrap is not a function" is displayed in the browser's developer console.

 

What do I have to change so that the example with kendo.dataModel.define works correctly?

Sample code https://jsfiddle.net/chstorb/pq45mn19/

Kind regards,

Chris 

2 Answers, 1 is accepted

Sort by
0
Christian Storb
Top achievements
Rank 2
Veteran
answered on 26 Aug 2020, 09:53 AM

All right, I think I already have a solution. It seems to work with the new offline data feature of the data source.

Sample: https://jsfiddle.net/chstorb/9wLqyu3f/

Kind regards,

Chris

 

0
Accepted
Plamen
Telerik team
answered on 27 Aug 2020, 06:21 AM

Hello,

Thank you for sharing the solution with the community.

Regards,
Plamen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Data Source
Asked by
Christian Storb
Top achievements
Rank 2
Veteran
Answers by
Christian Storb
Top achievements
Rank 2
Veteran
Plamen
Telerik team
Share this question
or