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

kendo ui datasource mapping of the model fails

1 Answer 267 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dávid
Top achievements
Rank 1
dávid asked on 13 May 2016, 11:47 AM

we would like to migrate our grid to Kendo UI grid and if it fits for us we will buy it. I tried to implement it, but I'm blocked with an issue. The id column works only if I provide 'id' instead of '_id' in the json and all the json property have to be the same as the model and column fild name.

For example if You change the 'title' filed to 'title2' and do the same in the column settings, the grid fails, there are empty columns. Or if I change the '_id' to 'id' the id column will contanins the values.

So for me it seems the mapping of the model fails, the 'from' doesn't work properly.

Check the example in jsbin: http://jsbin.com/welone/1/edit?html,css,js,output

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 17 May 2016, 06:11 AM

Hello David,

The cause for the behavior you have observed is misplacement of schema configuration. In the sample you have provided, the schema definition is placed as part of the transport settings. However, it should be directly placed bellow the dataSource configuration. Here is an updated version of the test page you have provided.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
dávid
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or