I would like to refer you to this post: http://www.telerik.com/forums/inline-editing-cancel-removes-the-row#gUEDci4cHEu8PsmAm4rhpg
It explains that the id field of a model cannot be set to "id" because it breaks the grid (clicking cancel deletes records). The post I have linked to was misunderstood by Nikolay Rusev who replied explaining case sensitivity - it has nothing to do with that. The fact is that either "id" is a reserved word that cannot be used by model fields or the grid has a bug.
I want this to either be officially recognized as a bug by the Kendo team (and fixed), or it should be properly documented that "id" cannot be used as a field name in a model. It has wasted too much of my time.
6 Answers, 1 is accepted

Hello Dean,
Actually the posts in the thread are quite correct. In the thread I explain few things:
1. schema.model.id - is a must in order to have state tracking and to have all CRUD operations working correctly (link).
2. the field which you define in the schema.model.id must be part of the model. In fact the default field is `id`. If you don't have `id` field in your model data you must specify which field defines uniquely the item (link).
3. JavaScript is case sensitive and the user was incorrectly defined schema.model.id to refer, incorrectly, to `id` field when in fact there is a `Id` field in this model data instead.
Regards,
Nikolay Rusev
Telerik

Sorry Nikolay, but I think you've misunderstood me. The 3 points you've given are good, crystal clear and well understood. Even though my code adheres to them, the grid misbehaves - I'm convinced there is a bug. If I change the name of my "id" field to say "somethingOtherThanId" then it works. Same field, same data and same grid, the only change is what I've named the field used for the schema.model.id
So this doesn't work (yet it's correct code):
schema: {
model: {
id:
"id"
,
fields: {
id: { type:
"number"
, validation: {required:
true
} }
This does work:
schema: {
model: {
id:
"somethingOtherThanId"
,
fields: {
somethingOtherThanId: { type:
"number"
, validation: {required:
true
} },
What I mean when I say the grid misbehaves is the grid deletes records when cancel is clicked. I'm not talking about cancelling a new record, I'm talking about editing an existing record and then clicking cancel.
Hello Dean,
I'm not sure how to replicate this behavior. Take for example this online demo. It is using ProductID as a id field and canceling edit operation doesn't seem to remove the item.
Can you demonstrate your scenario in a runnable example?
Regards,Nikolay Rusev
Telerik

Uh, yeah...
I wasted a lot of time on this too!
I wish I had figured this out sooner.
Hello,
Thank you for the feedback. We have updated the documentation so that it describes the specific behavior. The note is included in the article below:
https://docs.telerik.com/kendo-ui/framework/datasource/crud#setting-the-schema
Regards,
Viktor Tachev
Progress Telerik