Hello, I am struggling with a weird error while canceling a newly inserted row in a grid. Please help.
Below is a simplifed version of my code (http://jsfiddle.net/m2s59mpo/5/)
var myGrid = $("#my-table-grid").kendoGrid({ toolbar: [ { name: "create", text: "Create" } ], editable: { mode: "inline", confirmation: false }, columns: [ { field: "name" }, { field: "age" }, { command: [{ name: "edit"}] } ], dataSource: { //data: [], data: {"a": []}, schema: { data: "a", model: { id: "id", fields: { id: {type: "number"}, name: {type : "string"}, age: {type: "number"}, }} } },});
Steps to reproduce:
1. Click the "Create" button to insert a new row.
2. Fill in any data and click "Update" to save the row.
3. Click the "Create" button to insert a second row.
4. Click "Cancel" button right away without filling in any data in the second row.
Sympton:
The second row will NOT be canceled. Error message "Uncaught TypeError: Cannot read property 'uid' of undefined" is shown in the console.
This issue will not occur for the first row added (You can cancel the first row). Also, if I do not specify the data field in the dataSource section (http://jsfiddle.net/m2s59mpo/6/), it works fine too. In my real case, the data comes from a API call with structured JSON data so this is not an option for me.
I wonder if I misconfigured something or this is a bug. Please help. Thanks a lot in advance.